摘要:
In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
摘要:
Shuffle a set of numbers without duplicates. Example: 题意: 洗牌 Solution1: code 阅读全文
摘要:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
摘要:
Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make 阅读全文
摘要:
Example 1: Example 2: Note: The length of S will be in the range [1, 1000]. Each character S[i] will be in the set {'a', 'b', 'c', 'd'}. 题意: 计数不同的回文子序 阅读全文
摘要:
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output 阅读全文
摘要:
Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文