July 2017 - cook the code

Wednesday 26 July 2017

Reversal algorithm for array rotation

Reversal algorithm for array rotation Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. ...
Read More

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 =...
Read More

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 ...
Read More

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...
Read More

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...
Read More

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 ...
Read More

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...
Read More

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...
Read More