-
If there are n buckets and a pig drinking poison will die within m minutes, how many pigs (x) you need to figure out the pois...
-
You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move forwa...
-
Given a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai <...
-
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and e...
-
Given a string, sort it in decreasing order based on the frequency of characters.
Example 1:
123456789Input:"tree"O...
-
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference...
-
Given an array of integers where 1 ≤ a[i] ≤ n (n= size of array), some elements appear twice and others appear once.
Find all...
-
Given an array of integers, 1 ≤ a[i] ≤ n (n= size of array), some elements appear twice and others appear once.
Find all the ...
-
Given an n-ary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
For exa...
-
Given a non-empty array of numbers, $a_0, a_1, …, a_{n-1}$, where $0 \le a_i \le 2^{32}$.
Find the maximum result of $a_i \ \...