Tag: c++
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for …
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 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 …
A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. A binary tree …
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. You may assume k is always valid, 1 ≤ k ≤ BST’s …