Java Algorithm

Convert Roman to Integer in Java

Ashish Lahoti

Problem: Given a Roman numeral, convert it to an Integer.

Convert Integer to Roman in Java

Ashish Lahoti

Problem: Given an Integer input, convert it to a Roman numeral. Input is within the range from 1 to 3999.

M power N Using Recursive function

Ashish Lahoti

This is one of the example of using recursive function in Java to find M power N

Print All String Combinations Using Recursive function

Ashish Lahoti

Print all the possible combinations of a given String using Recursive function in Java

Fibonacci Series Using Recursive function

Ashish Lahoti

Fibonacci series implementation in java is frequently asked question in interview at fresher level. Moreover, it is a very famous example to show how to use recursive function in java.

Ashish Lahoti

Why it is called bubble sort ?

Bubble Sort is nothing but a comparison algorithm where -

• At the end of first iteration, largest element in the array get placed at last index
• At the end of second iteration, second largest element in the array get placed at second last index and so on…

This way large elements are moving towards the last indexes and hence small elements are moving towards the starting indexes which is also termed as smaller elements “bubble” to the top of the list that is why it is called bubble sort.