Coding Interview Questions
We are all aware that how the candidates do in an interview will define how well-versed they are with the most basic coding or programming skills. The interview may be for a Java, C++, or Javascript requirement, but the cornerstone remains the same: how powerful the candidates are in programming logic foundations.
Coding Interview Questions:
- Write code to determine whether or not a string is a palindrome.
- Generate any permutation of a String in an iterative and recursive manner?
- What is the best way to find the first non-repeated character in a String?
- In Java, how do you tell the difference between String, StringBuilder, and StringBuffer?
- Why is a Char array better than a String for storing passwords?
- How can you find the duplicate number in an array of numbers from 1 to 100?
- Find the number that is not present in the second array given two arrays: 1,2,3,4,5 and 2,3,1,0,5.
- How can you find the top two most significant numbers in an array?
- In a single pass, how do you find the middle element of a linked list?
- In a single pass, how do you find the 3rd element from the bottom?
- How do you reverse a singly linked list?
- How can you figure out how deep a binary tree is?
- Write a Java code to determine whether or not a tree is a binary search tree.
- In a binary tree, how do you perform preorder traversal?
- Write a programme that uses quick sort to sort numbers in a specific order.
- How do you use a Comparator to sort Java objects?
- Create Java code to implement Bubble Sort.
- In a range of min to max, write code for generate random numbers.
- Create an algorithm to determine the frequency in which a word appears in an article.