For example: It returns ‘b’ when the input is “abaccdeff”.
How to verify whether a binary tree is a binary search tree?
Given a matrix with 1s and 0s, please find the number of groups of 1s. A group is defined by horizontally or vertically adjacent 1s. For example, there are four groups of 1s in Figure 1 which are drawn with different colors.
No. 46 - Nodes with Sum in a Binary Search Tree
Given a binary search tree, please check whether there are two nodes in it whose sum equals a given value.
No. 47 - Search in a Rotation of an Array
When some elements at the beginning of an array are moved to the end, it gets a rotation of the original array. Please implement a function to search a number in a rotation of an increasingly sorted array. Assume there are no duplicated numbers in the array.
No. 48 - Least Number after Deleting Digits
Please get the least number after deleting k digits from the input number. For example, if the input number is 24635, the least number is 23 after deleting 3 digits.