Stack is an abstract data type. The basic operation of the stack can be: Push : Push object on top of stack. Throws an…
Basic traversal on tree is best explained on http://en.wikipedia.org/wiki/Tree_traversal . In Order: Pre Order: Post Order: If anything is missing in explanation, you…
The caterpillar problem. Input: int[] caterPillar = {2,4,5} int totalLeaves = 10 Here, you will have fixed size array with integer elements…
Problem: Finding the number of perfect squares between two integer range. Input: first integer and last integer -> int startInteger,…
Input: Integer array Diff: Integer difference Output: Total number of unique pairs having difference provided in the input. Here in…
Input: Integer array with 0 or more repeated values. Output: Total number of duplicate numbers present in the given array…
Input: X and Y are integer values, where X < Y N is the length of permutation Output: To print…
Input: array of integer value Output: print each iteration by subtracting the smallest elements till array becomes empty For example:…