I have been posting java programs on various topics such as Binary tree, LinkedList , String, Number, ArrayList, HashMap etc. So I am consolidating list of programs to create an index post. I will keep adding links to this post whenever I add any new program. These are frequently asked programs in interview. You can also go through top 50 java interview questions for interview questions.

### Collections:

- Collections interview questions and answers
- How HashMap internally works in java
- How to iterate over HashMap in java
- How to Sort ArrayList based on attributes using Comparator in java
- How to sort ArrayList based on attributes using Comparable in java
- How to remove duplicates from list in java
- How to iterate over ArrayList in java

### LinkedList :

- How to reverse a linked list in java
- How to reverse a linked list in pairs
- How to find middle element of linked list in java
- How to detect a loop in linked list in java
- Find start node of loop in linkedlist
- How to find nth element from end of linked list
- How to check if linked list is palindrome in java
- Add two numbers represented by linked list in java

### Binary tree :

- Binary tree in java
- Binary tree preorder traversal
- Binary tree postorder traversal
- Binary tree inorder traversal
- Binary tree level order traversal
- Binary tree spiral order traversal
- Binary tree reverse level order traversal
- Binary tree boundary traversal
- Print leaf nodes of binary tree
- Count leaf nodes in binary tree
- get maximum element in binary tree
- Print all paths from root to leaf in binary tree
- Print vertical sum of binary tree in java
- Get level of node in binary tree in java
- Lowest common ancestor(LCA) in binary tree in java

### Array :

- Find missing number in an array
- search an element in a sorted and rotated array in java
- Find second largest number in array
- Find number occurring odd number of times in array
- Minimum numbers of platforms required for railway station in java
- Find pair whose sum is closest to zero in array in java
- Find pair whose sum is closest to X in array in java
- Find all pairs of elements whose sum is equal to given number
- Search element in row wise and column wise sorted matrix
- Stock buy and sell to maximize profit.

### Sorting :

- How to implement merge sort in java
- How to implement bubble sort in java
- How to implement insertion sort in java

### String :

- How to reverse String in java
- How to check if two Strings are angrams
- Find length of String without using java inbuilt length method
- Find all substrings of String in java
- Find First non repeated character in a String
- Java Program to check Palindrome String
- Why String is immutable in javaFind duplicate characters in String

### Number :

- How to swap two numbers without using temporary variables
- Java program to check prime number
- Find prime factors of number in java
- Java Program to check armstrong number
- Fibonacci series program in java
- Java Program to check Palindrome Number
- Java Program to to find gcd and lcm of two numbers

Nice Article

with help of your website i learn java based web services

Heartfull thanks for your articles.

Thank you, I am glad that it helped you 🙂

These things are very helpful for anyone.

very helpful

Hi, the article is awesome, I learnt a lot from your blog. This UI is much better than before.

Plz add more interview programming questions to collections in the “Interview Program” section.

Thank you for the feedback. I was working on this UI from last 10 days, I am very glad to hear that it is looking better than previous one.If you want any further improvement, please let me know.

I will surely add more interview questions and will let you know.