Reversal algorithm for array rotation Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. ...
Wednesday, 26 July 2017
Thursday, 20 July 2017
Hiding of Class Variables
Hiding of Class Variables class Point { static int x = 2; } class Test extends Point { static double x =...
Saturday, 15 July 2017
Why an outer Java class can’t be private or protected
Why an outer Java class can’t be private or protected As soon as we try to use private or protected keyword while declaring an outer ...
Sunday, 9 July 2017
Iterative Method to find Height of Binary Tree
Iterative Method to find Height of Binary Tree There are two conventions to define height of Binary Tree 1) Number of n...
Find all possible interpretations of an array of digits
Find all possible interpretations of an array of digits Consider a coding system for alphabets to integers where ‘a’ is...
Saturday, 8 July 2017
Tree Isomorphism Problem
Tree Isomorphism Problem Write a function to detect if two trees are isomorphic. Two trees are called isomorphic if one ...
Reverse Level Order Traversal
Reverse Level Order Traversal We have discussed level order traversal of a post in previous post. The idea is to print...
Monday, 3 July 2017
Ternary Search Trees(Advanced concept explanation)
Ternary Search Trees (Advanced concept explanation) When you have to store a set of strings, what data structure do you use? Jon and Rob...