-
说到生成任意范围内等概率随机数,如果止步于x = rand () % RANGE,恐怕有点不够意思
-
如果不假思索地脱口而出24次,你就被直觉骗了咯
-
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s.
-
A message containing letters from A-Z is being encoded to numbers. Given an encoded message containing digits, determine the total number of ways to decode it.
-
Given a 2D board and a word, find if the word exists in the grid.
-
Given a string s, partition s such that every substring of the partition is a palindrome.
-
Sort a linked list in O(n log n) time using constant space complexity.
-
Numbers are said to be "reverse ordered" if N[i] > N[j] for i < j. How to get the number of pairs of reverse ordered items in O(nlogn) time.
-
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
-
Calculate the number of elements of an array that are not divisors of each element.Count the semiprime numbers in the given range [a..b]
-
Find the maximum number of flags that can be set on mountain peaks.
-
Find a maximum sum of a compact subsequence of array elements and any double slice.
-
Divide an array into the maximum number of same((-))sized blocks, each of which should contain an index P such that A[P - 1] < A[P] > A[P + 1].
-
Given a log of stock prices compute the maximum possible earning.