Category: c / c++
Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left …
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as …
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are …
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by …
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is …