#
Interview Archive

In this post, we will see Spring interview interview questions. If you are java/j2ee developer and have some experienced on Spring, you are going to face Spring interview questions. Here I am sharing a list …

In this post, we will see how to remove all white spaces from String in java. There are multiple ways to remove spaces from String. Using ReplaceAll Using Iteration Using ReplaceAll : You can simply …

Armstrong number is a 3 digit number which is equal to sum of cube of its digits. For example: 371,153 In this post, we will see how to check for Armstrong number in java. …

In this post, we will see how to swap two numbers without using temporary variables. There are three ways to do it. Java program: When you run above program, you will get following output: …

In this post, we will see how to find prime factors of a number in java. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and …

A palindrome is a word, phrase, number, or other sequence of symbols or elements that reads the same forward or reversed. For example: 12121 is palindrome as it reads same forward or reversed. madam is …

This is easy question. It may not be asked you directly, but you can use this program to create many other complex program. A prime number is a natural number greater than 1 that has …

Shell sort is in place comparison based sorting algorithm. It is generalization of insertion sort. It was invented by Donald shell. It allows to sort elements which are far apart. In case of insertion sort, comparison happens …

Counting sort is special sorting technique used to sort elements between specific range. Lets say elements belong to range 1 to K , then Counting sort can be used to sort elements in O(N) times. …

In this post, we will see how to implement heap sort in java. I will divide heap sort in multiple parts to make it more understandable. What is heap? Understanding complete binary tree Binary heaps …