Category: c / c++
You are given a data structu re of employee information, which includes the employee’s unique id, his importance value and his direct subordinates’ id. For example, employee 1 is …
The Classic Binary Search Algorithm can be used for a sorted array. What about if the array is rotated sorted? For example, is a rotated sorted array. Suppose an …
Write a class RecentCounter to count recent requests. It has only one method: ping(int t), where t represents some time in milliseconds. Return the number of pings that have …
Your task is to return an array (that contains integer numbers from 0 to N, N is the length of a given string S that contains only I or …
Given a binary search tree and a target, find out if there are any two numbers in the BST that sums up to this target. Given a Binary Search …