- 博客(6)
- 资源 (16)
- 收藏
- 关注
原创 Super Ugly Number
Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13,
2016-02-28 01:33:08 595
原创 Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13,
2016-02-23 01:40:27 308
原创 Remove Duplicate Letters
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order a
2016-02-23 00:42:15 437
原创 Coin Change
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of mone
2016-02-19 00:30:55 419
原创 Increasing Triplet Subsequence
Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if there exists i, j, k such that arr[i] arr[j]
2016-02-17 01:28:31 1405 2
原创 Verify Preorder Serialization of a Binary Tree
One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we record using a sentinel value such as #.
2016-02-05 14:50:14 1260
exceptional c++ style中文版 pdf 刘未鹏译
2010-09-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人