A PHP Error was encountered

Severity: Warning

Message: fopen(/var/cpanel/php/sessions/ea-php56/PHPSESSIDljceguvm9ap9ju225h3mf8nm1uq41m1q): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 174

Interview C++ coding problems/challenges | tree | C++ programming

Similar Collections

We are trying to list out the most frequently asked interview problems or the problem given in the coding rounds of IT giants.


Find the level in a binary tree with given sum K
Check whether a Binary Tree is BST (Binary Search Tree) or not
Print vertical sum of a binary tree
Print Boundary Sum of a Binary Tree
Given a Binary Tree T and a sum S, write a program to check whether there is a root to leaf path in that tree with the input sum S
Given a Binary Tree write a program to print the nodes which don’t have a sibling node. Print all the nodes separated by space which do not have sibling in the tree in sorted order if every node has a tree than print -1
Given a Two Binary Trees, write a function that returns true if one is mirror of other, else returns false
Given a Binary Tree where each node has positive and negative values. Convert this to a tree where each node contains the sum of the left and right sub trees in the original tree. The values of leaf nodes are changed to 0
Given a binary Tree, check whether the tree is symmetric or not
Write a program to print Reverse Level Order Traversal of a binary tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1
Given a Binary Tree, write a function getLevelDiff which returns the difference between the sum of nodes at odd level and the sum of nodes at even level
Write a function to detect if two trees are isomorphic
Given an expression tree evaluate the expression tree
Given a Binary Tree and a number K. Print all nodes that are at distance K from root (root is considered at distance 0 from itself)
Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side
Given a Binary Tree, find diameter of it. The diameter of a tree is the number of nodes on the longest path between two leaves in the tree
Given a BST and a value x, write a function to delete the nodes having values greater than or equal to x. The function will return the modified root
Given a binary tree, print the diagonal traversal of the binary tree
Given a Binary Tree, Print the corner nodes at each level. The node at the leftmost and the node at the rightmost
total questions: 33





Best Answers




A PHP Error was encountered

Severity: Warning

Message: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php56)

Filename: Unknown

Line Number: 0