Tag: Hashing

Find sub-array with 0 sum

Given an array of integers, check if array contains a sub-array having 0 sum. Also, prints end-points of all such sub-arrays.  

Print Diagonal Traversal of Binary Tree

Given a binary tree, print all nodes for each diagonal having negative slope (\). Assume that the left and right child of a node makes 45 degree angle with the parent.  

Find the diagonal sum of given binary tree

Given a binary tree, calculate sum of all nodes for each diagonal having negative slope (\). Assume that the left and right child of a node makes 45 degree angle with the parent.