[关闭]
@iar 2015-04-17 07:58 字数 6637 阅读 113

Leetcode freq 3

leetcode


Frequency 3题解

20141218

20141217

20141208

20141206

20141205

  1. private static void recur(String s, int left, List<List<String>> result) {
  2. if (left == s.length()) {
  3. result.add(new ArrayList<String>());
  4. }
  5. for (int i = left; i < s.length(); ++i) {
  6. List<List<String>> temp = new ArrayList<List<String>>();
  7. recur(s, i + 1, temp);
  8. for (List<String> partitions : temp) {
  9. partitions.add(0, s.substring(left, i + 1));
  10. }
  11. result.addAll(temp); // add()和addAll()的区别.
  12. }
  13. }

20141129

20141118

20141115

20141112


题目

# Leetcode problem freq
26 Remove Duplicates from Sorted Array 3
83 Remove Duplicates from Sorted List 3
112 Path Sum 3
7 Reverse Integer 3
19 Remove Nth Node From End of List 3
62 Unique Paths 3
108 Convert Sorted Array to Binary Search Tree 3
17 Letter Combinations of a Phone Number 3
39 Combination Sum 3
53 Maximum Subarray 3
63 Unique Paths II 3
64 Minimum Path Sum 3
74 Search a 2D Matrix 3
82 Remove Duplicates from Sorted List II 3
86 Partition List 3
93 Restore IP Addresses 3
105 Construct Binary Tree from Preorder and Inorder 3
106 Construct Binary Tree from Inorder and Postorder 3
114 Flatten Binary Tree to Linked List 3
116 ~~Populating Next Right Pointers in Each Node 3
29 ~~Divide Two Integers 3
33 ~~Search in Rotated Sorted Array 3
34 Search for a Range 3
43 Multiply Strings 3
51 N-Queens 3
52 N-Queens II 3
72 Edit Distance 3
94 Binary Tree Inorder Traversal 3
103 Binary Tree Zigzag Level Order Traversal 3
109 Convert Sorted List to Binary Search Tree 3
128 Longest Consecutive Sequence 3
130 Surrounded Regions 3
132 Palindrome Partitioning II 3
4 Median of Two Sorted Arrays 3
10 Regular Expression Matching 3
44 Wildcard Matching 3
81 Search in Rotated Sorted Array II 3
end 念念不忘必有回响 3
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注