0 Contents 0
Contents
1 Rotate Array in Java 189
2 Evaluate Reverse Polish Notation 150
3 Isomorphic Strings 21
4 Word Ladder 23
5 Word Ladder II 25
6 Median of Two Sorted Arrays 29
7 Kth Largest Element in an Array 31
8 Wildcard Matching 33
9 Regular Expression Matching in Java 35
10 Merge Intervals 39
11 Insert Interval 41
12 Two Sum 43
13 Two Sum II Input array is sorted 45
14 Two Sum III Data structure design 47
15 3Sum 49
16 4Sum 53
17 3Sum Closest 55
18 String to Integer (atoi) 57
19 Merge Sorted Array 59
20 Valid Parentheses 61
21 Longest Valid Parentheses 63
22 Implement strStr() 65
23 Minimum Size Subarray Sum 69
24 Search Insert Position 73
25 Longest Consecutive Sequence 75
26 Valid Palindrome 77
27 ZigZag Conversion 81
28 Add Binary 83
29 Length of Last Word 85
30 Triangle 87
31 Contains Duplicate 89
32 Contains Duplicate II 91
33 Contains Duplicate III 93
34 Remove Duplicates from Sorted Array 95
35 Remove Duplicates from Sorted Array II 99
36 Longest Substring Without Repeating Characters 103
37 Longest Substring Which Contains 2 Unique Characters 105
38 Substring with Concatenation of All Words 109
39 Minimum Window Substring 111
40 Reverse Words in a String 113
41 Find Minimum in Rotated Sorted Array 115
42 Find Minimum in Rotated Sorted Array II 117
43 Search in Rotated Sorted Array 119
44 Search in Rotated Sorted Array II 121
45 Min Stack 123
46 Majority Element 125
47 Majority Element II 127
48 Remove Element 129
49 Largest Rectangle in Histogram 131
50 Longest Common Prefix 133
51 Largest Number 135
52 Simplify Path 137
53 Compare Version Numbers 139
54 Gas Station 141
55 Pascal’s Triangle 143
56 Pascal’s Triangle II 145
57 Container With Most Water 147
58 Candy 149
59 Trapping Rain Water 151
60 Count and Say 153
61 Search for a Range 155
62 Basic Calculator 157
63 Group Anagrams 159
64 Shortest Palindrome 161
65 Rectangle Area 163
66 Summary Ranges 165
67 Increasing Triplet Subsequence 167
68 Get Target Number Using Number List and Arithmetic Operations 169
69 Reverse Vowels of a String 171
70 Flip Game 173
71 Flip Game II 175
72 Move Zeroes 177
73 Valid Anagram 179
74 Group Shifted Strings 181
75 Top K Frequent Elements 183
76 Find Peak Element 185
77 Word Pattern 187
78 Set Matrix Zeroes 189
79 Spiral Matrix 193
80 Spiral Matrix II 197
81 Search a 2D Matrix 199
82 Search a 2D Matrix II 201
83 Rotate Image 205
84 Valid Sudoku 207
85 Minimum Path Sum 209
86 Unique Paths 211
87 Unique Paths II 213
88 Number of Islands 215
89 Number of Islands II 217
90 Surrounded Regions 219
91 Maximal Rectangle 223
92 Maximal Square 225
93 Word Search 227
94 Word Search II 229
95 Integer Break 233
96 Range Sum Query 2D Immutable 235
97 Longest Increasing Path in a Matrix 237
98 Implement a Stack Using an Array in Java 239
99 Add Two Numbers 243
100 Reorder List 245
101 Linked List Cycle 251
102 Copy List with Random Pointer 253
103 Merge Two Sorted Lists 257
104 Odd Even Linked List 259
105 Remove Duplicates from Sorted List 261
106 Remove Duplicates from Sorted List II 263
107 Partition List 265
108 LRU Cache 267
109 Intersection of Two Linked Lists 271
110 Remove Linked List Elements 273
111 Swap Nodes in Pairs 275
112 Reverse Linked List 277
113 Reverse Linked List II 279
114 Remove Nth Node From End of List 281
115 Implement Stack using Queues 283
116 Implement Queue using Stacks 285
117 Palindrome Linked List 287
118 Implement a Queue using an Array in Java 289
119 Delete Node in a Linked List 291
120 Moving Average from Data Stream 293


No comments