# Algorithm Archive

## Data Structure and algorithm interview questions in java

I have been posting data structure and algorithms interview questions on various topics such as Array, Queue, Stack, Binary tree, LinkedList, String, Number, ArrayList, etc. So I am consolidating a list of programs to create …

## Print prime numbers from 1 to 100 in java

In this program, we will print prime numbers from 1 to 100 in java. A prime number is a number which has only two divisors 1 and itself. To check if the number is prime …

## Minimum Number of Jumps to reach last Index

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to find Minimum Number of Jumps to reach …

## Sort an array of 0s, 1s and 2s

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to sort an array of 0s, 1s and …

## Check if it is possible to reach end of given Array by Jumping

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. ﻿ ﻿ Problem Given an array with positive integers as elements indicating the maximum length …

## Inorder Successor in a Binary Search Tree

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to find Inorder Successor in a Binary Search …

## LCA of a K-ary Tree in O(Sqrt(height))

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see about how to find Lowest Common Ancestor of a …

## Largest Rectangular Area in a Histogram

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see about how to find largest rectangular area in a …

## Longest common Subsequence

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. Given two Strings A and B. Find the length of the Longest Common Subsequence (LCS) …

## Kruskal’s Algorithm for finding Minimum Spanning Tree

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. Kruskal’s Algorithm solves the problem of finding a Minimum Spanning Tree(MST) of any given connected …

## Coin Change Problem in java

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see about Coin Change problem in java. Problem Given an …