From c8f833d8e9069a834f00e63f0150fe111ecd5a33 Mon Sep 17 00:00:00 2001 From: ShusenTang Date: Tue, 1 Jan 2019 23:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=88=90=E4=BA=86=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=BD=A2=E5=BC=8F=EF=BC=8C=E9=87=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E5=9D=80=E6=9C=89=E7=9A=84=E5=8F=AF=E8=83=BD=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=EF=BC=8C=E5=90=8E=E6=9C=9F=E4=BC=9A=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 8196 bytes .../3.6/_importlib_modulespec.data.json | 1 + .../3.6/_importlib_modulespec.meta.json | 1 + .mypy_cache/3.6/abc.data.json | 1 + .mypy_cache/3.6/abc.meta.json | 1 + .mypy_cache/3.6/builtins.data.json | 1 + .mypy_cache/3.6/builtins.meta.json | 1 + .mypy_cache/3.6/codecs.data.json | 1 + .mypy_cache/3.6/codecs.meta.json | 1 + .../3.6/collections/__init__.data.json | 1 + .../3.6/collections/__init__.meta.json | 1 + .mypy_cache/3.6/collections/abc.data.json | 1 + .mypy_cache/3.6/collections/abc.meta.json | 1 + .mypy_cache/3.6/importlib/__init__.data.json | 1 + .mypy_cache/3.6/importlib/__init__.meta.json | 1 + .mypy_cache/3.6/importlib/abc.data.json | 1 + .mypy_cache/3.6/importlib/abc.meta.json | 1 + .mypy_cache/3.6/importlib/machinery.data.json | 1 + .mypy_cache/3.6/importlib/machinery.meta.json | 1 + .mypy_cache/3.6/importlib/util.data.json | 1 + .mypy_cache/3.6/importlib/util.meta.json | 1 + .mypy_cache/3.6/io.data.json | 1 + .mypy_cache/3.6/io.meta.json | 1 + .mypy_cache/3.6/mmap.data.json | 1 + .mypy_cache/3.6/mmap.meta.json | 1 + .mypy_cache/3.6/os/__init__.data.json | 1 + .mypy_cache/3.6/os/__init__.meta.json | 1 + .mypy_cache/3.6/os/path.data.json | 1 + .mypy_cache/3.6/os/path.meta.json | 1 + .mypy_cache/3.6/posix.data.json | 1 + .mypy_cache/3.6/posix.meta.json | 1 + .mypy_cache/3.6/sys.data.json | 1 + .mypy_cache/3.6/sys.meta.json | 1 + .mypy_cache/3.6/tmp.data.json | 1 + .mypy_cache/3.6/tmp.meta.json | 1 + .mypy_cache/3.6/types.data.json | 1 + .mypy_cache/3.6/types.meta.json | 1 + .mypy_cache/3.6/typing.data.json | 1 + .mypy_cache/3.6/typing.meta.json | 1 + 001-Two Sum/README.md | 4 - .../README.md | 19 --- .../solution.h | 11 -- README.md | 136 +++++++++++++++++- .../solution.h => solutions/1. Two Sum.md | 9 ++ .../100. Same Tree.md | 0 .../101. Symmetric Tree.md | 0 .../104. Maximum Depth of Binary Tree.md | 0 ...7. Binary Tree Level Order Traversal II.md | 0 ...vert Sorted Array to Binary Search Tree.md | 0 .../11. Container With Most Water.md | 0 .../110. Balanced Binary Tree.md | 0 .../111. Minimum Depth of Binary Tree.md | 0 .../112. Path Sum.md | 0 .../118. Pascal's Triangle.md | 0 .../119. Pascal's Triangle II.md | 0 .../12. Integer to Roman.md | 0 .../121. Best Time to Buy and Sell Stock.md | 0 ...122. Best Time to Buy and Sell Stock II.md | 0 .../125. Valid Palindrome.md | 0 .../13. Roman to Integer.md | 0 .../136. Single Number.md | 0 .../14. Longest Common Prefix.md | 0 .../141. Linked List Cycle.md | 0 15. 3Sum.md => solutions/15. 3Sum.md | 0 .../155. Min Stack.md | 0 .../16. 3Sum Closest.md | 0 .../160. Intersection of Two Linked Lists.md | 0 ...167. Two Sum II - Input array is sorted.md | 0 .../168. Excel Sheet Column Title.md | 0 .../169. Majority Element.md | 0 .... Letter Combinations of a Phone Number.md | 0 .../171. Excel Sheet Column Number.md | 0 .../172. Factorial Trailing Zeroes.md | 0 18. 4Sum.md => solutions/18. 4Sum.md | 0 .../189. Rotate Array.md | 0 .../19. Remove Nth Node From End of List.md | 0 .../190. Reverse Bits.md | 0 .../191. Number of 1 Bits.md | 0 .../198. House Robber.md | 0 .../2. Add Two Numbers.md | 0 .../20. Valid Parentheses.md | 0 .../202. Happy Number.md | 0 .../203. Remove Linked List Elements.md | 0 .../204. Count Primes.md | 0 .../205. Isomorphic Strings.md | 0 .../206. Reverse Linked List.md | 0 .../21. Merge Two Sorted Lists.md | 0 .../217. Contains Duplicate.md | 0 .../219. Contains Duplicate II.md | 0 .../22. Generate Parentheses.md | 0 .../225. Implement Stack using Queues.md | 0 .../226. Invert Binary Tree.md | 0 .../231. Power of Two.md | 0 .../232. Implement Queue using Stacks.md | 0 .../234. Palindrome Linked List.md | 0 ...Common Ancestor of a Binary Search Tree.md | 0 .../237. Delete Node in a Linked List.md | 0 .../24. Swap Nodes in Pairs.md | 0 .../242. Valid Anagram.md | 0 .../257. Binary Tree Paths.md | 0 .../258. Add Digits.md | 0 ...26. Remove Duplicates from Sorted Array.md | 0 .../263. Ugly Number.md | 0 .../268. Missing Number.md | 0 .../27. Remove Element.md | 0 .../278. First Bad Version.md | 0 .../283. Move Zeroes.md | 0 .../29. Divide Two Integers.md | 0 .../290. Word Pattern.md | 0 .../292. Nim Game.md | 0 ... Substring Without Repeating Characters.md | 0 .../303. Range Sum Query - Immutable.md | 0 .../31. Next Permutation.md | 0 .../326. Power of Three.md | 0 .../342. Power of Four.md | 0 .../344. Reverse String.md | 0 .../345. Reverse Vowels of a String.md | 0 .../349. Intersection of Two Arrays.md | 0 .../35. Search Insert Position.md | 0 .../350. Intersection of Two Arrays II.md | 0 .../367. Valid Perfect Square.md | 0 .../371. Sum of Two Integers.md | 0 .../374. Guess Number Higher or Lower.md | 0 .../38. Count and Say.md | 0 .../383. Ransom Note.md | 0 ...387. First Unique Character in a String.md | 0 .../389. Find the Difference.md | 0 .../400. Nth Digit.md | 0 .../404. Sum of Left Leaves.md | 0 .../405. Convert a Number to Hexadecimal.md | 0 .../409. Longest Palindrome.md | 0 .../414. Third Maximum Number.md | 0 .../415. Add Strings.md | 0 .../429. N-ary Tree Level Order Traversal.md | 0 .../434. Number of Segments in a String.md | 0 .../437. Path Sum III.md | 0 .../438. Find All Anagrams in a String.md | 0 .../441. Arranging Coins.md | 0 .../443. String Compression.md | 0 .../447. Number of Boomerangs.md | 0 ...ind All Numbers Disappeared in an Array.md | 0 .... Minimum Moves to Equal Array Elements.md | 0 .../455. Assign Cookies.md | 0 .../459. Repeated Substring Pattern.md | 0 .../461. Hamming Distance.md | 0 .../463. Island Perimeter.md | 0 475. Heaters.md => solutions/475. Heaters.md | 0 .../476. Number Complement.md | 0 .../485. Max Consecutive Ones.md | 0 .../496. Next Greater Element I.md | 0 .../5. Longest Palindromic Substring.md | 0 .../500. Keyboard Row.md | 0 .../53. Maximum Subarray.md | 0 .../532. K-diff Pairs in an Array.md | 0 .../561. Array Partition I.md | 0 .../566. Reshape the Matrix.md | 0 .../58. Length of Last Word.md | 0 .... Shortest Unsorted Continuous Subarray.md | 0 .../6. ZigZag Conversion.md | 0 .../605. Can Place Flowers.md | 0 .../628. Maximum Product of Three Numbers.md | 0 .../643. Maximum Average Subarray I.md | 0 66. Plus One.md => solutions/66. Plus One.md | 0 .../661. Image Smoother.md | 0 .../665. Non-decreasing Array.md | 0 .../67. Add Binary.md | 0 69. Sqrt(x).md => solutions/69. Sqrt(x).md | 0 .../7. Reverse Integer.md | 0 .../70. Climbing Stairs.md | 0 .../8. String to Integer (atoi).md | 0 .../83. Remove Duplicates from Sorted List.md | 0 .../88. Merge Sorted Array.md | 0 .../9. Palindrome Number.md | 0 173 files changed, 182 insertions(+), 35 deletions(-) create mode 100644 .DS_Store create mode 100644 .mypy_cache/3.6/_importlib_modulespec.data.json create mode 100644 .mypy_cache/3.6/_importlib_modulespec.meta.json create mode 100644 .mypy_cache/3.6/abc.data.json create mode 100644 .mypy_cache/3.6/abc.meta.json create mode 100644 .mypy_cache/3.6/builtins.data.json create mode 100644 .mypy_cache/3.6/builtins.meta.json create mode 100644 .mypy_cache/3.6/codecs.data.json create mode 100644 .mypy_cache/3.6/codecs.meta.json create mode 100644 .mypy_cache/3.6/collections/__init__.data.json create mode 100644 .mypy_cache/3.6/collections/__init__.meta.json create mode 100644 .mypy_cache/3.6/collections/abc.data.json create mode 100644 .mypy_cache/3.6/collections/abc.meta.json create mode 100644 .mypy_cache/3.6/importlib/__init__.data.json create mode 100644 .mypy_cache/3.6/importlib/__init__.meta.json create mode 100644 .mypy_cache/3.6/importlib/abc.data.json create mode 100644 .mypy_cache/3.6/importlib/abc.meta.json create mode 100644 .mypy_cache/3.6/importlib/machinery.data.json create mode 100644 .mypy_cache/3.6/importlib/machinery.meta.json create mode 100644 .mypy_cache/3.6/importlib/util.data.json create mode 100644 .mypy_cache/3.6/importlib/util.meta.json create mode 100644 .mypy_cache/3.6/io.data.json create mode 100644 .mypy_cache/3.6/io.meta.json create mode 100644 .mypy_cache/3.6/mmap.data.json create mode 100644 .mypy_cache/3.6/mmap.meta.json create mode 100644 .mypy_cache/3.6/os/__init__.data.json create mode 100644 .mypy_cache/3.6/os/__init__.meta.json create mode 100644 .mypy_cache/3.6/os/path.data.json create mode 100644 .mypy_cache/3.6/os/path.meta.json create mode 100644 .mypy_cache/3.6/posix.data.json create mode 100644 .mypy_cache/3.6/posix.meta.json create mode 100644 .mypy_cache/3.6/sys.data.json create mode 100644 .mypy_cache/3.6/sys.meta.json create mode 100644 .mypy_cache/3.6/tmp.data.json create mode 100644 .mypy_cache/3.6/tmp.meta.json create mode 100644 .mypy_cache/3.6/types.data.json create mode 100644 .mypy_cache/3.6/types.meta.json create mode 100644 .mypy_cache/3.6/typing.data.json create mode 100644 .mypy_cache/3.6/typing.meta.json delete mode 100644 001-Two Sum/README.md delete mode 100644 026-Remove Duplicates from Sorted Array/README.md delete mode 100644 026-Remove Duplicates from Sorted Array/solution.h rename 001-Two Sum/solution.h => solutions/1. Two Sum.md (72%) rename 100. Same Tree.md => solutions/100. Same Tree.md (100%) rename 101. Symmetric Tree.md => solutions/101. Symmetric Tree.md (100%) rename 104. Maximum Depth of Binary Tree.md => solutions/104. Maximum Depth of Binary Tree.md (100%) rename 107. Binary Tree Level Order Traversal II.md => solutions/107. Binary Tree Level Order Traversal II.md (100%) rename 108. Convert Sorted Array to Binary Search Tree.md => solutions/108. Convert Sorted Array to Binary Search Tree.md (100%) rename 11. Container With Most Water.md => solutions/11. Container With Most Water.md (100%) rename 110. Balanced Binary Tree.md => solutions/110. Balanced Binary Tree.md (100%) rename 111. Minimum Depth of Binary Tree.md => solutions/111. Minimum Depth of Binary Tree.md (100%) rename 112. Path Sum.md => solutions/112. Path Sum.md (100%) rename 118. Pascal's Triangle.md => solutions/118. Pascal's Triangle.md (100%) rename 119. Pascal's Triangle II.md => solutions/119. Pascal's Triangle II.md (100%) rename 12. Integer to Roman.md => solutions/12. Integer to Roman.md (100%) rename 121. Best Time to Buy and Sell Stock.md => solutions/121. Best Time to Buy and Sell Stock.md (100%) rename 122. Best Time to Buy and Sell Stock II.md => solutions/122. Best Time to Buy and Sell Stock II.md (100%) rename 125. Valid Palindrome.md => solutions/125. Valid Palindrome.md (100%) rename 13. Roman to Integer.md => solutions/13. Roman to Integer.md (100%) rename 136. Single Number.md => solutions/136. Single Number.md (100%) rename 14. Longest Common Prefix.md => solutions/14. Longest Common Prefix.md (100%) rename 141. Linked List Cycle.md => solutions/141. Linked List Cycle.md (100%) rename 15. 3Sum.md => solutions/15. 3Sum.md (100%) rename 155. Min Stack.md => solutions/155. Min Stack.md (100%) rename 16. 3Sum Closest.md => solutions/16. 3Sum Closest.md (100%) rename 160. Intersection of Two Linked Lists.md => solutions/160. Intersection of Two Linked Lists.md (100%) rename 167. Two Sum II - Input array is sorted.md => solutions/167. Two Sum II - Input array is sorted.md (100%) rename 168. Excel Sheet Column Title.md => solutions/168. Excel Sheet Column Title.md (100%) rename 169. Majority Element.md => solutions/169. Majority Element.md (100%) rename 17. Letter Combinations of a Phone Number.md => solutions/17. Letter Combinations of a Phone Number.md (100%) rename 171. Excel Sheet Column Number.md => solutions/171. Excel Sheet Column Number.md (100%) rename 172. Factorial Trailing Zeroes.md => solutions/172. Factorial Trailing Zeroes.md (100%) rename 18. 4Sum.md => solutions/18. 4Sum.md (100%) rename 189. Rotate Array.md => solutions/189. Rotate Array.md (100%) rename 19. Remove Nth Node From End of List.md => solutions/19. Remove Nth Node From End of List.md (100%) rename 190. Reverse Bits.md => solutions/190. Reverse Bits.md (100%) rename 191. Number of 1 Bits.md => solutions/191. Number of 1 Bits.md (100%) rename 198. House Robber.md => solutions/198. House Robber.md (100%) rename 2. Add Two Numbers.md => solutions/2. Add Two Numbers.md (100%) rename 20. Valid Parentheses.md => solutions/20. Valid Parentheses.md (100%) rename 202. Happy Number.md => solutions/202. Happy Number.md (100%) rename 203. Remove Linked List Elements.md => solutions/203. Remove Linked List Elements.md (100%) rename 204. Count Primes.md => solutions/204. Count Primes.md (100%) rename 205. Isomorphic Strings.md => solutions/205. Isomorphic Strings.md (100%) rename 206. Reverse Linked List.md => solutions/206. Reverse Linked List.md (100%) rename 21. Merge Two Sorted Lists.md => solutions/21. Merge Two Sorted Lists.md (100%) rename 217. Contains Duplicate.md => solutions/217. Contains Duplicate.md (100%) rename 219. Contains Duplicate II.md => solutions/219. Contains Duplicate II.md (100%) rename 22. Generate Parentheses.md => solutions/22. Generate Parentheses.md (100%) rename 225. Implement Stack using Queues.md => solutions/225. Implement Stack using Queues.md (100%) rename 226. Invert Binary Tree.md => solutions/226. Invert Binary Tree.md (100%) rename 231. Power of Two.md => solutions/231. Power of Two.md (100%) rename 232. Implement Queue using Stacks.md => solutions/232. Implement Queue using Stacks.md (100%) rename 234. Palindrome Linked List.md => solutions/234. Palindrome Linked List.md (100%) rename 235. Lowest Common Ancestor of a Binary Search Tree.md => solutions/235. Lowest Common Ancestor of a Binary Search Tree.md (100%) rename 237. Delete Node in a Linked List.md => solutions/237. Delete Node in a Linked List.md (100%) rename 24. Swap Nodes in Pairs.md => solutions/24. Swap Nodes in Pairs.md (100%) rename 242. Valid Anagram.md => solutions/242. Valid Anagram.md (100%) rename 257. Binary Tree Paths.md => solutions/257. Binary Tree Paths.md (100%) rename 258. Add Digits.md => solutions/258. Add Digits.md (100%) rename 026. Remove Duplicates from Sorted Array.md => solutions/26. Remove Duplicates from Sorted Array.md (100%) rename 263. Ugly Number.md => solutions/263. Ugly Number.md (100%) rename 268. Missing Number.md => solutions/268. Missing Number.md (100%) rename 027-Remove Element.md => solutions/27. Remove Element.md (100%) rename 278. First Bad Version.md => solutions/278. First Bad Version.md (100%) rename 283. Move Zeroes.md => solutions/283. Move Zeroes.md (100%) rename 29. Divide Two Integers.md => solutions/29. Divide Two Integers.md (100%) rename 290. Word Pattern.md => solutions/290. Word Pattern.md (100%) rename 292. Nim Game.md => solutions/292. Nim Game.md (100%) rename 3. Longest Substring Without Repeating Characters.md => solutions/3. Longest Substring Without Repeating Characters.md (100%) rename 303. Range Sum Query - Immutable.md => solutions/303. Range Sum Query - Immutable.md (100%) rename 31. Next Permutation.md => solutions/31. Next Permutation.md (100%) rename 326. Power of Three.md => solutions/326. Power of Three.md (100%) rename 342. Power of Four.md => solutions/342. Power of Four.md (100%) rename 344. Reverse String.md => solutions/344. Reverse String.md (100%) rename 345. Reverse Vowels of a String.md => solutions/345. Reverse Vowels of a String.md (100%) rename 349. Intersection of Two Arrays.md => solutions/349. Intersection of Two Arrays.md (100%) rename 35. Search Insert Position.md => solutions/35. Search Insert Position.md (100%) rename 350. Intersection of Two Arrays II.md => solutions/350. Intersection of Two Arrays II.md (100%) rename 367. Valid Perfect Square.md => solutions/367. Valid Perfect Square.md (100%) rename 371. Sum of Two Integers.md => solutions/371. Sum of Two Integers.md (100%) rename 374. Guess Number Higher or Lower.md => solutions/374. Guess Number Higher or Lower.md (100%) rename 38. Count and Say.md => solutions/38. Count and Say.md (100%) rename 383. Ransom Note.md => solutions/383. Ransom Note.md (100%) rename 387. First Unique Character in a String.md => solutions/387. First Unique Character in a String.md (100%) rename 389. Find the Difference.md => solutions/389. Find the Difference.md (100%) rename 400. Nth Digit.md => solutions/400. Nth Digit.md (100%) rename 404. Sum of Left Leaves.md => solutions/404. Sum of Left Leaves.md (100%) rename 405. Convert a Number to Hexadecimal.md => solutions/405. Convert a Number to Hexadecimal.md (100%) rename 409. Longest Palindrome.md => solutions/409. Longest Palindrome.md (100%) rename 414. Third Maximum Number.md => solutions/414. Third Maximum Number.md (100%) rename 415. Add Strings.md => solutions/415. Add Strings.md (100%) rename 429. N-ary Tree Level Order Traversal.md => solutions/429. N-ary Tree Level Order Traversal.md (100%) rename 434. Number of Segments in a String.md => solutions/434. Number of Segments in a String.md (100%) rename 437. Path Sum III.md => solutions/437. Path Sum III.md (100%) rename 438. Find All Anagrams in a String.md => solutions/438. Find All Anagrams in a String.md (100%) rename 441. Arranging Coins.md => solutions/441. Arranging Coins.md (100%) rename 443. String Compression.md => solutions/443. String Compression.md (100%) rename 447. Number of Boomerangs.md => solutions/447. Number of Boomerangs.md (100%) rename 448. Find All Numbers Disappeared in an Array.md => solutions/448. Find All Numbers Disappeared in an Array.md (100%) rename 453. Minimum Moves to Equal Array Elements.md => solutions/453. Minimum Moves to Equal Array Elements.md (100%) rename 455. Assign Cookies.md => solutions/455. Assign Cookies.md (100%) rename 459. Repeated Substring Pattern.md => solutions/459. Repeated Substring Pattern.md (100%) rename 461. Hamming Distance.md => solutions/461. Hamming Distance.md (100%) rename 463. Island Perimeter.md => solutions/463. Island Perimeter.md (100%) rename 475. Heaters.md => solutions/475. Heaters.md (100%) rename 476. Number Complement.md => solutions/476. Number Complement.md (100%) rename 485. Max Consecutive Ones.md => solutions/485. Max Consecutive Ones.md (100%) rename 496. Next Greater Element I.md => solutions/496. Next Greater Element I.md (100%) rename 5. Longest Palindromic Substring.md => solutions/5. Longest Palindromic Substring.md (100%) rename 500. Keyboard Row.md => solutions/500. Keyboard Row.md (100%) rename 53. Maximum Subarray.md => solutions/53. Maximum Subarray.md (100%) rename 532. K-diff Pairs in an Array.md => solutions/532. K-diff Pairs in an Array.md (100%) rename 561. Array Partition I.md => solutions/561. Array Partition I.md (100%) rename 566. Reshape the Matrix.md => solutions/566. Reshape the Matrix.md (100%) rename 58. Length of Last Word.md => solutions/58. Length of Last Word.md (100%) rename 581. Shortest Unsorted Continuous Subarray.md => solutions/581. Shortest Unsorted Continuous Subarray.md (100%) rename 6. ZigZag Conversion.md => solutions/6. ZigZag Conversion.md (100%) rename 605. Can Place Flowers.md => solutions/605. Can Place Flowers.md (100%) rename 628. Maximum Product of Three Numbers.md => solutions/628. Maximum Product of Three Numbers.md (100%) rename 643. Maximum Average Subarray I.md => solutions/643. Maximum Average Subarray I.md (100%) rename 66. Plus One.md => solutions/66. Plus One.md (100%) rename 661. Image Smoother.md => solutions/661. Image Smoother.md (100%) rename 665. Non-decreasing Array.md => solutions/665. Non-decreasing Array.md (100%) rename 67. Add Binary.md => solutions/67. Add Binary.md (100%) rename 69. Sqrt(x).md => solutions/69. Sqrt(x).md (100%) rename 7. Reverse Integer.md => solutions/7. Reverse Integer.md (100%) rename 70. Climbing Stairs.md => solutions/70. Climbing Stairs.md (100%) rename 8. String to Integer (atoi).md => solutions/8. String to Integer (atoi).md (100%) rename 83. Remove Duplicates from Sorted List.md => solutions/83. Remove Duplicates from Sorted List.md (100%) rename 88. Merge Sorted Array.md => solutions/88. Merge Sorted Array.md (100%) rename 9. Palindrome Number.md => solutions/9. Palindrome Number.md (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6fb777be2a6415dce70a6219bc7232ed95d6e091 GIT binary patch literal 8196 zcmeHMTWl0n7(U-pV5SW8w3fCk1y(9pb(Iz?P*GgkB4Qy_x1}whWp`(2N2W7%XLbve z;^HN~7>&0?<2}a2Yb5BK!HD``j6N7^xR_{+Pexxwqc8qv&TNIUB_t-M(K*SSf9Cv` zbIv#4IcNS|#u(aidNX5nj4_2SA^AM2N)(|N*99dKw5TLO{)~CdWDc{Ln;yNuI&26L z2oVSo2oVSo2oabG2+)}=iZac)FSTJEA`l|*zeGUn4>7ugOa!tZrN4Dh<);87%c$8e zbWeGJ?-L7TB9H|seOHPpvj+sO2vQ74chbj%ImtvI3sOpV2I| z$suPn>7~4!+m_1i5>H(zZzvtycRP+Xd7nz}FpbdxUfu54UdptMtnX~<2AS;cHErD) zZF6$A?)q_(QlTiSq7Lxdv9Z-n*T-Wm>&D};v30AP=QoEx0<}G`M4;&mj zG=BIQIXMIy1gn@b*=I}7RChC0n#L-uO8{XFHYYRA@W?sAN?E!2b_rMHXc4Y6MYz=R zdD{Hw=G(T^Xq|m##<7#;L1TbdxP;gidhE&?c|xZ*<5;<2+a2JQnUs~uSt-xhXj#IT z+A7>k*0HQE$2C3EvHSZxW4~7nbe^hjr|V?Bc0bqv=Q-E7)1X*p-sqr+6sk(}wtYl| zad#M5mt;etNls9GYe8-Of?G&9r6ojGDSP)Sq%QhOL|S z;7)o^wrB1&jjURUgxYPVhK-3TURhDMC>rg{rOkVDrgwlhD2m^@WNB2}t{2M#N*jB4F3A;43C;Wcqh>)uC%;jSuOo0_#~kCjRr7S~nT z&kbv|Xm4Iljduo(H?G&Bee^1aX~=FR;z9E*)brh<=dCH%+dg90lbyGdreA0_>bhuD z8WPVv=)=^IXq0d@6ltMyaeyshE7>|au)5h^T2M#WBkU#iK0D4nWS_II*|+Qm_A@)n zeq(>IKf$1)3e{MM8Z1K`*I^Z!(27mC6`Rq89`vFQ{YYaFChoyLcsPhd7{_5ejK}ae zp1_lM9qZ?;DqfajoG`_5QVNGpp#Z}j?UVGEVNg7Of@#k^#Tsrz3lqB=XS0tAtJdu5I z{Ss~2bjzfN=xXd&1n2nN3Ez5o{S^w4pDX^Ow!FSkRXB>exT5fg)U2v+R*C$4mejRq zYZRh6pDnem+Ip210xy%=4O&7WzVkT~ix)-f+S)aZGqEn!i&FQZ#Qln$VL!36h+r<} z6Jeu7)AKXzg_4D9s@n}th+&Eq~4a6cZvLwGbG?NfLGFXCmq zf>-f2-od*#ievZy$MF$P_$2-U-{89`wC$Wi+wV)$cG&6Y&~sjfu~T& nums) { - if(nums.empty()) return 0; - int count = 0; - for(int i = 1; i < nums.size(); i++){ - if(nums[i] != nums[count]) nums[++count] = nums[i]; - } - return count+1; - } -}; -``` diff --git a/026-Remove Duplicates from Sorted Array/solution.h b/026-Remove Duplicates from Sorted Array/solution.h deleted file mode 100644 index 8593879..0000000 --- a/026-Remove Duplicates from Sorted Array/solution.h +++ /dev/null @@ -1,11 +0,0 @@ -class Solution { -public: - int removeDuplicates(vector& nums) { - if(nums.empty()) return 0; - int count = 0; - for(int i = 1; i < nums.size(); i++){ - if(nums[i] != nums[count]) nums[++count] = nums[i]; - } - return count+1; - } -}; diff --git a/README.md b/README.md index bb77013..a9f192e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,136 @@ # LeetCode - My LeetCode solutions. +LeetCode solutions with Chinese explanation. LeetCode中文题解。 +持续更新中,欢迎交流,欢迎star。 + +| # | 题目 | 题解 | 难度 | +| ---- | -----------| ------- | ------- | +| 1 |[Two Sum](https://leetcode.com/problems/two-sum)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/1.%Two%Sum.md)|Easy| | +| 2 |[Add Two Numbers](https://leetcode.com/problems/add-two-numbers)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/2.%Add%Two%Numbers.md)|Medium| | +| 3 |[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/3.%Longest%Substring%Without%Repeating%Characters.md)|Medium| | +| 5 |[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/5.%Longest%Palindromic%Substring.md)|Medium| | +| 6 |[ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/6.%ZigZag%Conversion.md)|Medium| | +| 7 |[Reverse Integer](https://leetcode.com/problems/reverse-integer)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/7.%Reverse%Integer.md)|Easy| | +| 8 |[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/8.%String%to%Integer%(atoi).md)|Medium| | +| 9 |[Palindrome Number](https://leetcode.com/problems/palindrome-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/9.%Palindrome%Number.md)|Easy| | +| 11 |[Container With Most Water](https://leetcode.com/problems/container-with-most-water)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/11.%Container%With%Most%Water.md)|Medium| | +| 12 |[Integer to Roman](https://leetcode.com/problems/integer-to-roman)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/12.%Integer%to%Roman.md)|Medium| | +| 13 |[Roman to Integer](https://leetcode.com/problems/roman-to-integer)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/13.%Roman%to%Integer.md)|Easy| | +| 14 |[Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/14.%Longest%Common%Prefix.md)|Easy| | +| 15 |[3Sum](https://leetcode.com/problems/3sum)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/15.%3Sum.md)|Medium| | +| 16 |[3Sum Closest](https://leetcode.com/problems/3sum-closest)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/16.%3Sum%Closest.md)|Medium| | +| 17 |[Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/17.%Letter%Combinations%of%a%Phone%Number.md)|Medium| | +| 18 |[4Sum](https://leetcode.com/problems/4sum)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/18.%4Sum.md)|Medium| | +| 19 |[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/19.%Remove%Nth%Node%From%End%of%List.md)|Medium| | +| 20 |[Valid Parentheses](https://leetcode.com/problems/valid-parentheses)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/20.%Valid%Parentheses.md)|Easy| | +| 21 |[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/21.%Merge%Two%Sorted%Lists.md)|Easy| | +| 22 |[Generate Parentheses](https://leetcode.com/problems/generate-parentheses)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/22.%Generate%Parentheses.md)|Medium| | +| 24 |[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/24.%Swap%Nodes%in%Pairs.md)|Medium| | +| 26 |[Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/26.%Remove%Duplicates%from%Sorted%Array.md)|Easy| | +| 27 |[Remove Element](https://leetcode.com/problems/remove-element)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/27.%Remove%Element.md)|Easy| | +| 29 |[Divide Two Integers](https://leetcode.com/problems/divide-two-integers)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/29.%Divide%Two%Integers.md)|Medium| | +| 31 |[Next Permutation](https://leetcode.com/problems/next-permutation)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/31.%Next%Permutation.md)|Medium| | +| 35 |[Search Insert Position](https://leetcode.com/problems/search-insert-position)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/35.%Search%Insert%Position.md)|Easy| | +| 38 |[Count and Say](https://leetcode.com/problems/count-and-say)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/38.%Count%and%Say.md)|Easy| | +| 53 |[Maximum Subarray](https://leetcode.com/problems/maximum-subarray)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/53.%Maximum%Subarray.md)|Easy| | +| 58 |[Length of Last Word](https://leetcode.com/problems/length-of-last-word)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/58.%Length%of%Last%Word.md)|Easy| | +| 66 |[Plus One](https://leetcode.com/problems/plus-one)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/66.%Plus%One.md)|Easy| | +| 67 |[Add Binary](https://leetcode.com/problems/add-binary)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/67.%Add%Binary.md)|Easy| | +| 69 |[Sqrt(x)](https://leetcode.com/problems/sqrtx)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/69.%Sqrt(x).md)|Easy| | +| 70 |[Climbing Stairs](https://leetcode.com/problems/climbing-stairs)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/70.%Climbing%Stairs.md)|Easy| | +| 83 |[Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/83.%Remove%Duplicates%from%Sorted%List.md)|Easy| | +| 88 |[Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/88.%Merge%Sorted%Array.md)|Easy| | +| 100 |[Same Tree](https://leetcode.com/problems/same-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/100.%Same%Tree.md)|Easy| | +| 101 |[Symmetric Tree](https://leetcode.com/problems/symmetric-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/101.%Symmetric%Tree.md)|Easy| | +| 104 |[Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/104.%Maximum%Depth%of%Binary%Tree.md)|Easy| | +| 107 |[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/107.%Binary%Tree%Level%Order%Traversal%II.md)|Easy| | +| 108 |[Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/108.%Convert%Sorted%Array%to%Binary%Search%Tree.md)|Easy| | +| 110 |[Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/110.%Balanced%Binary%Tree.md)|Easy| | +| 111 |[Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/111.%Minimum%Depth%of%Binary%Tree.md)|Easy| | +| 112 |[Path Sum](https://leetcode.com/problems/path-sum)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/112.%Path%Sum.md)|Easy| | +| 118 |[Pascal's Triangle](https://leetcode.com/problems/pascals-triangle)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/118.%Pascal's%Triangle.md)|Easy| | +| 119 |[Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/119.%Pascal's%Triangle%II.md)|Easy| | +| 121 |[Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/121.%Best%Time%to%Buy%and%Sell%Stock.md)|Easy| | +| 122 |[Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/122.%Best%Time%to%Buy%and%Sell%Stock%II.md)|Easy| | +| 125 |[Valid Palindrome](https://leetcode.com/problems/valid-palindrome)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/125.%Valid%Palindrome.md)|Easy| | +| 136 |[Single Number](https://leetcode.com/problems/single-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/136.%Single%Number.md)|Easy| | +| 141 |[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/141.%Linked%List%Cycle.md)|Easy| | +| 155 |[Min Stack](https://leetcode.com/problems/min-stack)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/155.%Min%Stack.md)|Easy| | +| 160 |[Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/160.%Intersection%of%Two%Linked%Lists.md)|Easy| | +| 167 |[Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii---input-array-is-sorted)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/167.%Two%Sum%II%-%Input%array%is%sorted.md)|Easy| | +| 168 |[Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/168.%Excel%Sheet%Column%Title.md)|Easy| | +| 169 |[Majority Element](https://leetcode.com/problems/majority-element)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/169.%Majority%Element.md)|Easy| | +| 171 |[Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/171.%Excel%Sheet%Column%Number.md)|Easy| | +| 172 |[Factorial Trailing Zeroes](https://leetcode.com/problems/factorial-trailing-zeroes)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/172.%Factorial%Trailing%Zeroes.md)|Easy| | +| 189 |[Rotate Array](https://leetcode.com/problems/rotate-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/189.%Rotate%Array.md)|Easy| | +| 190 |[Reverse Bits](https://leetcode.com/problems/reverse-bits)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/190.%Reverse%Bits.md)|Easy| | +| 191 |[Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/191.%Number%of%1%Bits.md)|Easy| | +| 198 |[House Robber](https://leetcode.com/problems/house-robber)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/198.%House%Robber.md)|Easy| | +| 202 |[Happy Number](https://leetcode.com/problems/happy-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/202.%Happy%Number.md)|Easy| | +| 203 |[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/203.%Remove%Linked%List%Elements.md)|Easy| | +| 204 |[Count Primes](https://leetcode.com/problems/count-primes)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/204.%Count%Primes.md)|Easy| | +| 205 |[Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/205.%Isomorphic%Strings.md)|Easy| | +| 206 |[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/206.%Reverse%Linked%List.md)|Easy| | +| 217 |[Contains Duplicate](https://leetcode.com/problems/contains-duplicate)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/217.%Contains%Duplicate.md)|Easy| | +| 219 |[Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/219.%Contains%Duplicate%II.md)|Easy| | +| 225 |[Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/225.%Implement%Stack%using%Queues.md)|Easy| | +| 226 |[Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/226.%Invert%Binary%Tree.md)|Easy| | +| 231 |[Power of Two](https://leetcode.com/problems/power-of-two)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/231.%Power%of%Two.md)|Easy| | +| 232 |[Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/232.%Implement%Queue%using%Stacks.md)|Easy| | +| 234 |[Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/234.%Palindrome%Linked%List.md)|Easy| | +| 235 |[Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/235.%Lowest%Common%Ancestor%of%a%Binary%Search%Tree.md)|Easy| | +| 237 |[Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/237.%Delete%Node%in%a%Linked%List.md)|Easy| | +| 242 |[Valid Anagram](https://leetcode.com/problems/valid-anagram)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/242.%Valid%Anagram.md)|Easy| | +| 257 |[Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/257.%Binary%Tree%Paths.md)|Easy| | +| 258 |[Add Digits](https://leetcode.com/problems/add-digits)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/258.%Add%Digits.md)|Easy| | +| 263 |[Ugly Number](https://leetcode.com/problems/ugly-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/263.%Ugly%Number.md)|Easy| | +| 268 |[Missing Number](https://leetcode.com/problems/missing-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/268.%Missing%Number.md)|Easy| | +| 278 |[First Bad Version](https://leetcode.com/problems/first-bad-version)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/278.%First%Bad%Version.md)|Easy| | +| 283 |[Move Zeroes](https://leetcode.com/problems/move-zeroes)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/283.%Move%Zeroes.md)|Easy| | +| 290 |[Word Pattern](https://leetcode.com/problems/word-pattern)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/290.%Word%Pattern.md)|Easy| | +| 292 |[Nim Game](https://leetcode.com/problems/nim-game)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/292.%Nim%Game.md)|Easy| | +| 303 |[Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/303.%Range%Sum%Query%-%Immutable.md)|Easy| | +| 326 |[Power of Three](https://leetcode.com/problems/power-of-three)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/326.%Power%of%Three.md)|Easy| | +| 342 |[Power of Four](https://leetcode.com/problems/power-of-four)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/342.%Power%of%Four.md)|Easy| | +| 344 |[Reverse String](https://leetcode.com/problems/reverse-string)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/344.%Reverse%String.md)|Easy| | +| 345 |[Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/345.%Reverse%Vowels%of%a%String.md)|Easy| | +| 349 |[Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/349.%Intersection%of%Two%Arrays.md)|Easy| | +| 350 |[Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/350.%Intersection%of%Two%Arrays%II.md)|Easy| | +| 367 |[Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/367.%Valid%Perfect%Square.md)|Easy| | +| 371 |[Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/371.%Sum%of%Two%Integers.md)|Easy| | +| 374 |[Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/374.%Guess%Number%Higher%or%Lower.md)|Easy| | +| 383 |[Ransom Note](https://leetcode.com/problems/ransom-note)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/383.%Ransom%Note.md)|Easy| | +| 387 |[First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/387.%First%Unique%Character%in%a%String.md)|Easy| | +| 389 |[Find the Difference](https://leetcode.com/problems/find-the-difference)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/389.%Find%the%Difference.md)|Easy| | +| 400 |[Nth Digit](https://leetcode.com/problems/nth-digit)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/400.%Nth%Digit.md)|Easy| | +| 404 |[Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/404.%Sum%of%Left%Leaves.md)|Easy| | +| 405 |[Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/405.%Convert%a%Number%to%Hexadecimal.md)|Easy| | +| 409 |[Longest Palindrome](https://leetcode.com/problems/longest-palindrome)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/409.%Longest%Palindrome.md)|Easy| | +| 414 |[Third Maximum Number](https://leetcode.com/problems/third-maximum-number)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/414.%Third%Maximum%Number.md)|Easy| | +| 415 |[Add Strings](https://leetcode.com/problems/add-strings)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/415.%Add%Strings.md)|Easy| | +| 429 |[N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/429.%N-ary%Tree%Level%Order%Traversal.md)|Easy| | +| 434 |[Number of Segments in a String](https://leetcode.com/problems/number-of-segments-in-a-string)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/434.%Number%of%Segments%in%a%String.md)|Easy| | +| 437 |[Path Sum III](https://leetcode.com/problems/path-sum-iii)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/437.%Path%Sum%III.md)|Easy| | +| 438 |[Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/438.%Find%All%Anagrams%in%a%String.md)|Easy| | +| 441 |[Arranging Coins](https://leetcode.com/problems/arranging-coins)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/441.%Arranging%Coins.md)|Easy| | +| 443 |[String Compression](https://leetcode.com/problems/string-compression)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/443.%String%Compression.md)|Easy| | +| 447 |[Number of Boomerangs](https://leetcode.com/problems/number-of-boomerangs)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/447.%Number%of%Boomerangs.md)|Easy| | +| 448 |[Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/448.%Find%All%Numbers%Disappeared%in%an%Array.md)|Easy| | +| 453 |[Minimum Moves to Equal Array Elements](https://leetcode.com/problems/minimum-moves-to-equal-array-elements)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/453.%Minimum%Moves%to%Equal%Array%Elements.md)|Easy| | +| 455 |[Assign Cookies](https://leetcode.com/problems/assign-cookies)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/455.%Assign%Cookies.md)|Easy| | +| 459 |[Repeated Substring Pattern](https://leetcode.com/problems/repeated-substring-pattern)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/459.%Repeated%Substring%Pattern.md)|Easy| | +| 461 |[Hamming Distance](https://leetcode.com/problems/hamming-distance)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/461.%Hamming%Distance.md)|Easy| | +| 463 |[Island Perimeter](https://leetcode.com/problems/island-perimeter)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/463.%Island%Perimeter.md)|Easy| | +| 475 |[Heaters](https://leetcode.com/problems/heaters)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/475.%Heaters.md)|Easy| | +| 476 |[Number Complement](https://leetcode.com/problems/number-complement)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/476.%Number%Complement.md)|Easy| | +| 485 |[Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/485.%Max%Consecutive%Ones.md)|Easy| | +| 496 |[Next Greater Element I](https://leetcode.com/problems/next-greater-element-i)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/496.%Next%Greater%Element%I.md)|Easy| | +| 500 |[Keyboard Row](https://leetcode.com/problems/keyboard-row)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/500.%Keyboard%Row.md)|Easy| | +| 532 |[K-diff Pairs in an Array](https://leetcode.com/problems/k-diff-pairs-in-an-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/532.%K-diff%Pairs%in%an%Array.md)|Easy| | +| 561 |[Array Partition I](https://leetcode.com/problems/array-partition-i)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/561.%Array%Partition%I.md)|Easy| | +| 566 |[Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/566.%Reshape%the%Matrix.md)|Easy| | +| 581 |[Shortest Unsorted Continuous Subarray](https://leetcode.com/problems/shortest-unsorted-continuous-subarray)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/581.%Shortest%Unsorted%Continuous%Subarray.md)|Easy| | +| 605 |[Can Place Flowers](https://leetcode.com/problems/can-place-flowers)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/605.%Can%Place%Flowers.md)|Easy| | +| 628 |[Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/628.%Maximum%Product%of%Three%Numbers.md)|Easy| | +| 643 |[Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/643.%Maximum%Average%Subarray%I.md)|Easy| | +| 661 |[Image Smoother](https://leetcode.com/problems/image-smoother)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/661.%Image%Smoother.md)|Easy| | +| 665 |[Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array)|[C++](https://github.com/ShusenTang/LeetCode/blob/master/solutions/665.%Non-decreasing%Array.md)|Easy| | \ No newline at end of file diff --git a/001-Two Sum/solution.h b/solutions/1. Two Sum.md similarity index 72% rename from 001-Two Sum/solution.h rename to solutions/1. Two Sum.md index 887b092..303696d 100644 --- a/001-Two Sum/solution.h +++ b/solutions/1. Two Sum.md @@ -1,3 +1,10 @@ +# [1. Two Sum](https://leetcode.com/problems/two-sum/) + +# 思路 +刚开始用暴力匹配,后来看了答案恍然大悟,hash会快很多。 + +# C++ +``` C++ class Solution { public: vector twoSum(vector& nums, int target) { @@ -14,3 +21,5 @@ public: } } }; + +``` diff --git a/100. Same Tree.md b/solutions/100. Same Tree.md similarity index 100% rename from 100. Same Tree.md rename to solutions/100. Same Tree.md diff --git a/101. Symmetric Tree.md b/solutions/101. Symmetric Tree.md similarity index 100% rename from 101. Symmetric Tree.md rename to solutions/101. Symmetric Tree.md diff --git a/104. Maximum Depth of Binary Tree.md b/solutions/104. Maximum Depth of Binary Tree.md similarity index 100% rename from 104. Maximum Depth of Binary Tree.md rename to solutions/104. Maximum Depth of Binary Tree.md diff --git a/107. Binary Tree Level Order Traversal II.md b/solutions/107. Binary Tree Level Order Traversal II.md similarity index 100% rename from 107. Binary Tree Level Order Traversal II.md rename to solutions/107. Binary Tree Level Order Traversal II.md diff --git a/108. Convert Sorted Array to Binary Search Tree.md b/solutions/108. Convert Sorted Array to Binary Search Tree.md similarity index 100% rename from 108. Convert Sorted Array to Binary Search Tree.md rename to solutions/108. Convert Sorted Array to Binary Search Tree.md diff --git a/11. Container With Most Water.md b/solutions/11. Container With Most Water.md similarity index 100% rename from 11. Container With Most Water.md rename to solutions/11. Container With Most Water.md diff --git a/110. Balanced Binary Tree.md b/solutions/110. Balanced Binary Tree.md similarity index 100% rename from 110. Balanced Binary Tree.md rename to solutions/110. Balanced Binary Tree.md diff --git a/111. Minimum Depth of Binary Tree.md b/solutions/111. Minimum Depth of Binary Tree.md similarity index 100% rename from 111. Minimum Depth of Binary Tree.md rename to solutions/111. Minimum Depth of Binary Tree.md diff --git a/112. Path Sum.md b/solutions/112. Path Sum.md similarity index 100% rename from 112. Path Sum.md rename to solutions/112. Path Sum.md diff --git a/118. Pascal's Triangle.md b/solutions/118. Pascal's Triangle.md similarity index 100% rename from 118. Pascal's Triangle.md rename to solutions/118. Pascal's Triangle.md diff --git a/119. Pascal's Triangle II.md b/solutions/119. Pascal's Triangle II.md similarity index 100% rename from 119. Pascal's Triangle II.md rename to solutions/119. Pascal's Triangle II.md diff --git a/12. Integer to Roman.md b/solutions/12. Integer to Roman.md similarity index 100% rename from 12. Integer to Roman.md rename to solutions/12. Integer to Roman.md diff --git a/121. Best Time to Buy and Sell Stock.md b/solutions/121. Best Time to Buy and Sell Stock.md similarity index 100% rename from 121. Best Time to Buy and Sell Stock.md rename to solutions/121. Best Time to Buy and Sell Stock.md diff --git a/122. Best Time to Buy and Sell Stock II.md b/solutions/122. Best Time to Buy and Sell Stock II.md similarity index 100% rename from 122. Best Time to Buy and Sell Stock II.md rename to solutions/122. Best Time to Buy and Sell Stock II.md diff --git a/125. Valid Palindrome.md b/solutions/125. Valid Palindrome.md similarity index 100% rename from 125. Valid Palindrome.md rename to solutions/125. Valid Palindrome.md diff --git a/13. Roman to Integer.md b/solutions/13. Roman to Integer.md similarity index 100% rename from 13. Roman to Integer.md rename to solutions/13. Roman to Integer.md diff --git a/136. Single Number.md b/solutions/136. Single Number.md similarity index 100% rename from 136. Single Number.md rename to solutions/136. Single Number.md diff --git a/14. Longest Common Prefix.md b/solutions/14. Longest Common Prefix.md similarity index 100% rename from 14. Longest Common Prefix.md rename to solutions/14. Longest Common Prefix.md diff --git a/141. Linked List Cycle.md b/solutions/141. Linked List Cycle.md similarity index 100% rename from 141. Linked List Cycle.md rename to solutions/141. Linked List Cycle.md diff --git a/15. 3Sum.md b/solutions/15. 3Sum.md similarity index 100% rename from 15. 3Sum.md rename to solutions/15. 3Sum.md diff --git a/155. Min Stack.md b/solutions/155. Min Stack.md similarity index 100% rename from 155. Min Stack.md rename to solutions/155. Min Stack.md diff --git a/16. 3Sum Closest.md b/solutions/16. 3Sum Closest.md similarity index 100% rename from 16. 3Sum Closest.md rename to solutions/16. 3Sum Closest.md diff --git a/160. Intersection of Two Linked Lists.md b/solutions/160. Intersection of Two Linked Lists.md similarity index 100% rename from 160. Intersection of Two Linked Lists.md rename to solutions/160. Intersection of Two Linked Lists.md diff --git a/167. Two Sum II - Input array is sorted.md b/solutions/167. Two Sum II - Input array is sorted.md similarity index 100% rename from 167. Two Sum II - Input array is sorted.md rename to solutions/167. Two Sum II - Input array is sorted.md diff --git a/168. Excel Sheet Column Title.md b/solutions/168. Excel Sheet Column Title.md similarity index 100% rename from 168. Excel Sheet Column Title.md rename to solutions/168. Excel Sheet Column Title.md diff --git a/169. Majority Element.md b/solutions/169. Majority Element.md similarity index 100% rename from 169. Majority Element.md rename to solutions/169. Majority Element.md diff --git a/17. Letter Combinations of a Phone Number.md b/solutions/17. Letter Combinations of a Phone Number.md similarity index 100% rename from 17. Letter Combinations of a Phone Number.md rename to solutions/17. Letter Combinations of a Phone Number.md diff --git a/171. Excel Sheet Column Number.md b/solutions/171. Excel Sheet Column Number.md similarity index 100% rename from 171. Excel Sheet Column Number.md rename to solutions/171. Excel Sheet Column Number.md diff --git a/172. Factorial Trailing Zeroes.md b/solutions/172. Factorial Trailing Zeroes.md similarity index 100% rename from 172. Factorial Trailing Zeroes.md rename to solutions/172. Factorial Trailing Zeroes.md diff --git a/18. 4Sum.md b/solutions/18. 4Sum.md similarity index 100% rename from 18. 4Sum.md rename to solutions/18. 4Sum.md diff --git a/189. Rotate Array.md b/solutions/189. Rotate Array.md similarity index 100% rename from 189. Rotate Array.md rename to solutions/189. Rotate Array.md diff --git a/19. Remove Nth Node From End of List.md b/solutions/19. Remove Nth Node From End of List.md similarity index 100% rename from 19. Remove Nth Node From End of List.md rename to solutions/19. Remove Nth Node From End of List.md diff --git a/190. Reverse Bits.md b/solutions/190. Reverse Bits.md similarity index 100% rename from 190. Reverse Bits.md rename to solutions/190. Reverse Bits.md diff --git a/191. Number of 1 Bits.md b/solutions/191. Number of 1 Bits.md similarity index 100% rename from 191. Number of 1 Bits.md rename to solutions/191. Number of 1 Bits.md diff --git a/198. House Robber.md b/solutions/198. House Robber.md similarity index 100% rename from 198. House Robber.md rename to solutions/198. House Robber.md diff --git a/2. Add Two Numbers.md b/solutions/2. Add Two Numbers.md similarity index 100% rename from 2. Add Two Numbers.md rename to solutions/2. Add Two Numbers.md diff --git a/20. Valid Parentheses.md b/solutions/20. Valid Parentheses.md similarity index 100% rename from 20. Valid Parentheses.md rename to solutions/20. Valid Parentheses.md diff --git a/202. Happy Number.md b/solutions/202. Happy Number.md similarity index 100% rename from 202. Happy Number.md rename to solutions/202. Happy Number.md diff --git a/203. Remove Linked List Elements.md b/solutions/203. Remove Linked List Elements.md similarity index 100% rename from 203. Remove Linked List Elements.md rename to solutions/203. Remove Linked List Elements.md diff --git a/204. Count Primes.md b/solutions/204. Count Primes.md similarity index 100% rename from 204. Count Primes.md rename to solutions/204. Count Primes.md diff --git a/205. Isomorphic Strings.md b/solutions/205. Isomorphic Strings.md similarity index 100% rename from 205. Isomorphic Strings.md rename to solutions/205. Isomorphic Strings.md diff --git a/206. Reverse Linked List.md b/solutions/206. Reverse Linked List.md similarity index 100% rename from 206. Reverse Linked List.md rename to solutions/206. Reverse Linked List.md diff --git a/21. Merge Two Sorted Lists.md b/solutions/21. Merge Two Sorted Lists.md similarity index 100% rename from 21. Merge Two Sorted Lists.md rename to solutions/21. Merge Two Sorted Lists.md diff --git a/217. Contains Duplicate.md b/solutions/217. Contains Duplicate.md similarity index 100% rename from 217. Contains Duplicate.md rename to solutions/217. Contains Duplicate.md diff --git a/219. Contains Duplicate II.md b/solutions/219. Contains Duplicate II.md similarity index 100% rename from 219. Contains Duplicate II.md rename to solutions/219. Contains Duplicate II.md diff --git a/22. Generate Parentheses.md b/solutions/22. Generate Parentheses.md similarity index 100% rename from 22. Generate Parentheses.md rename to solutions/22. Generate Parentheses.md diff --git a/225. Implement Stack using Queues.md b/solutions/225. Implement Stack using Queues.md similarity index 100% rename from 225. Implement Stack using Queues.md rename to solutions/225. Implement Stack using Queues.md diff --git a/226. Invert Binary Tree.md b/solutions/226. Invert Binary Tree.md similarity index 100% rename from 226. Invert Binary Tree.md rename to solutions/226. Invert Binary Tree.md diff --git a/231. Power of Two.md b/solutions/231. Power of Two.md similarity index 100% rename from 231. Power of Two.md rename to solutions/231. Power of Two.md diff --git a/232. Implement Queue using Stacks.md b/solutions/232. Implement Queue using Stacks.md similarity index 100% rename from 232. Implement Queue using Stacks.md rename to solutions/232. Implement Queue using Stacks.md diff --git a/234. Palindrome Linked List.md b/solutions/234. Palindrome Linked List.md similarity index 100% rename from 234. Palindrome Linked List.md rename to solutions/234. Palindrome Linked List.md diff --git a/235. Lowest Common Ancestor of a Binary Search Tree.md b/solutions/235. Lowest Common Ancestor of a Binary Search Tree.md similarity index 100% rename from 235. Lowest Common Ancestor of a Binary Search Tree.md rename to solutions/235. Lowest Common Ancestor of a Binary Search Tree.md diff --git a/237. Delete Node in a Linked List.md b/solutions/237. Delete Node in a Linked List.md similarity index 100% rename from 237. Delete Node in a Linked List.md rename to solutions/237. Delete Node in a Linked List.md diff --git a/24. Swap Nodes in Pairs.md b/solutions/24. Swap Nodes in Pairs.md similarity index 100% rename from 24. Swap Nodes in Pairs.md rename to solutions/24. Swap Nodes in Pairs.md diff --git a/242. Valid Anagram.md b/solutions/242. Valid Anagram.md similarity index 100% rename from 242. Valid Anagram.md rename to solutions/242. Valid Anagram.md diff --git a/257. Binary Tree Paths.md b/solutions/257. Binary Tree Paths.md similarity index 100% rename from 257. Binary Tree Paths.md rename to solutions/257. Binary Tree Paths.md diff --git a/258. Add Digits.md b/solutions/258. Add Digits.md similarity index 100% rename from 258. Add Digits.md rename to solutions/258. Add Digits.md diff --git a/026. Remove Duplicates from Sorted Array.md b/solutions/26. Remove Duplicates from Sorted Array.md similarity index 100% rename from 026. Remove Duplicates from Sorted Array.md rename to solutions/26. Remove Duplicates from Sorted Array.md diff --git a/263. Ugly Number.md b/solutions/263. Ugly Number.md similarity index 100% rename from 263. Ugly Number.md rename to solutions/263. Ugly Number.md diff --git a/268. Missing Number.md b/solutions/268. Missing Number.md similarity index 100% rename from 268. Missing Number.md rename to solutions/268. Missing Number.md diff --git a/027-Remove Element.md b/solutions/27. Remove Element.md similarity index 100% rename from 027-Remove Element.md rename to solutions/27. Remove Element.md diff --git a/278. First Bad Version.md b/solutions/278. First Bad Version.md similarity index 100% rename from 278. First Bad Version.md rename to solutions/278. First Bad Version.md diff --git a/283. Move Zeroes.md b/solutions/283. Move Zeroes.md similarity index 100% rename from 283. Move Zeroes.md rename to solutions/283. Move Zeroes.md diff --git a/29. Divide Two Integers.md b/solutions/29. Divide Two Integers.md similarity index 100% rename from 29. Divide Two Integers.md rename to solutions/29. Divide Two Integers.md diff --git a/290. Word Pattern.md b/solutions/290. Word Pattern.md similarity index 100% rename from 290. Word Pattern.md rename to solutions/290. Word Pattern.md diff --git a/292. Nim Game.md b/solutions/292. Nim Game.md similarity index 100% rename from 292. Nim Game.md rename to solutions/292. Nim Game.md diff --git a/3. Longest Substring Without Repeating Characters.md b/solutions/3. Longest Substring Without Repeating Characters.md similarity index 100% rename from 3. Longest Substring Without Repeating Characters.md rename to solutions/3. Longest Substring Without Repeating Characters.md diff --git a/303. Range Sum Query - Immutable.md b/solutions/303. Range Sum Query - Immutable.md similarity index 100% rename from 303. Range Sum Query - Immutable.md rename to solutions/303. Range Sum Query - Immutable.md diff --git a/31. Next Permutation.md b/solutions/31. Next Permutation.md similarity index 100% rename from 31. Next Permutation.md rename to solutions/31. Next Permutation.md diff --git a/326. Power of Three.md b/solutions/326. Power of Three.md similarity index 100% rename from 326. Power of Three.md rename to solutions/326. Power of Three.md diff --git a/342. Power of Four.md b/solutions/342. Power of Four.md similarity index 100% rename from 342. Power of Four.md rename to solutions/342. Power of Four.md diff --git a/344. Reverse String.md b/solutions/344. Reverse String.md similarity index 100% rename from 344. Reverse String.md rename to solutions/344. Reverse String.md diff --git a/345. Reverse Vowels of a String.md b/solutions/345. Reverse Vowels of a String.md similarity index 100% rename from 345. Reverse Vowels of a String.md rename to solutions/345. Reverse Vowels of a String.md diff --git a/349. Intersection of Two Arrays.md b/solutions/349. Intersection of Two Arrays.md similarity index 100% rename from 349. Intersection of Two Arrays.md rename to solutions/349. Intersection of Two Arrays.md diff --git a/35. Search Insert Position.md b/solutions/35. Search Insert Position.md similarity index 100% rename from 35. Search Insert Position.md rename to solutions/35. Search Insert Position.md diff --git a/350. Intersection of Two Arrays II.md b/solutions/350. Intersection of Two Arrays II.md similarity index 100% rename from 350. Intersection of Two Arrays II.md rename to solutions/350. Intersection of Two Arrays II.md diff --git a/367. Valid Perfect Square.md b/solutions/367. Valid Perfect Square.md similarity index 100% rename from 367. Valid Perfect Square.md rename to solutions/367. Valid Perfect Square.md diff --git a/371. Sum of Two Integers.md b/solutions/371. Sum of Two Integers.md similarity index 100% rename from 371. Sum of Two Integers.md rename to solutions/371. Sum of Two Integers.md diff --git a/374. Guess Number Higher or Lower.md b/solutions/374. Guess Number Higher or Lower.md similarity index 100% rename from 374. Guess Number Higher or Lower.md rename to solutions/374. Guess Number Higher or Lower.md diff --git a/38. Count and Say.md b/solutions/38. Count and Say.md similarity index 100% rename from 38. Count and Say.md rename to solutions/38. Count and Say.md diff --git a/383. Ransom Note.md b/solutions/383. Ransom Note.md similarity index 100% rename from 383. Ransom Note.md rename to solutions/383. Ransom Note.md diff --git a/387. First Unique Character in a String.md b/solutions/387. First Unique Character in a String.md similarity index 100% rename from 387. First Unique Character in a String.md rename to solutions/387. First Unique Character in a String.md diff --git a/389. Find the Difference.md b/solutions/389. Find the Difference.md similarity index 100% rename from 389. Find the Difference.md rename to solutions/389. Find the Difference.md diff --git a/400. Nth Digit.md b/solutions/400. Nth Digit.md similarity index 100% rename from 400. Nth Digit.md rename to solutions/400. Nth Digit.md diff --git a/404. Sum of Left Leaves.md b/solutions/404. Sum of Left Leaves.md similarity index 100% rename from 404. Sum of Left Leaves.md rename to solutions/404. Sum of Left Leaves.md diff --git a/405. Convert a Number to Hexadecimal.md b/solutions/405. Convert a Number to Hexadecimal.md similarity index 100% rename from 405. Convert a Number to Hexadecimal.md rename to solutions/405. Convert a Number to Hexadecimal.md diff --git a/409. Longest Palindrome.md b/solutions/409. Longest Palindrome.md similarity index 100% rename from 409. Longest Palindrome.md rename to solutions/409. Longest Palindrome.md diff --git a/414. Third Maximum Number.md b/solutions/414. Third Maximum Number.md similarity index 100% rename from 414. Third Maximum Number.md rename to solutions/414. Third Maximum Number.md diff --git a/415. Add Strings.md b/solutions/415. Add Strings.md similarity index 100% rename from 415. Add Strings.md rename to solutions/415. Add Strings.md diff --git a/429. N-ary Tree Level Order Traversal.md b/solutions/429. N-ary Tree Level Order Traversal.md similarity index 100% rename from 429. N-ary Tree Level Order Traversal.md rename to solutions/429. N-ary Tree Level Order Traversal.md diff --git a/434. Number of Segments in a String.md b/solutions/434. Number of Segments in a String.md similarity index 100% rename from 434. Number of Segments in a String.md rename to solutions/434. Number of Segments in a String.md diff --git a/437. Path Sum III.md b/solutions/437. Path Sum III.md similarity index 100% rename from 437. Path Sum III.md rename to solutions/437. Path Sum III.md diff --git a/438. Find All Anagrams in a String.md b/solutions/438. Find All Anagrams in a String.md similarity index 100% rename from 438. Find All Anagrams in a String.md rename to solutions/438. Find All Anagrams in a String.md diff --git a/441. Arranging Coins.md b/solutions/441. Arranging Coins.md similarity index 100% rename from 441. Arranging Coins.md rename to solutions/441. Arranging Coins.md diff --git a/443. String Compression.md b/solutions/443. String Compression.md similarity index 100% rename from 443. String Compression.md rename to solutions/443. String Compression.md diff --git a/447. Number of Boomerangs.md b/solutions/447. Number of Boomerangs.md similarity index 100% rename from 447. Number of Boomerangs.md rename to solutions/447. Number of Boomerangs.md diff --git a/448. Find All Numbers Disappeared in an Array.md b/solutions/448. Find All Numbers Disappeared in an Array.md similarity index 100% rename from 448. Find All Numbers Disappeared in an Array.md rename to solutions/448. Find All Numbers Disappeared in an Array.md diff --git a/453. Minimum Moves to Equal Array Elements.md b/solutions/453. Minimum Moves to Equal Array Elements.md similarity index 100% rename from 453. Minimum Moves to Equal Array Elements.md rename to solutions/453. Minimum Moves to Equal Array Elements.md diff --git a/455. Assign Cookies.md b/solutions/455. Assign Cookies.md similarity index 100% rename from 455. Assign Cookies.md rename to solutions/455. Assign Cookies.md diff --git a/459. Repeated Substring Pattern.md b/solutions/459. Repeated Substring Pattern.md similarity index 100% rename from 459. Repeated Substring Pattern.md rename to solutions/459. Repeated Substring Pattern.md diff --git a/461. Hamming Distance.md b/solutions/461. Hamming Distance.md similarity index 100% rename from 461. Hamming Distance.md rename to solutions/461. Hamming Distance.md diff --git a/463. Island Perimeter.md b/solutions/463. Island Perimeter.md similarity index 100% rename from 463. Island Perimeter.md rename to solutions/463. Island Perimeter.md diff --git a/475. Heaters.md b/solutions/475. Heaters.md similarity index 100% rename from 475. Heaters.md rename to solutions/475. Heaters.md diff --git a/476. Number Complement.md b/solutions/476. Number Complement.md similarity index 100% rename from 476. Number Complement.md rename to solutions/476. Number Complement.md diff --git a/485. Max Consecutive Ones.md b/solutions/485. Max Consecutive Ones.md similarity index 100% rename from 485. Max Consecutive Ones.md rename to solutions/485. Max Consecutive Ones.md diff --git a/496. Next Greater Element I.md b/solutions/496. Next Greater Element I.md similarity index 100% rename from 496. Next Greater Element I.md rename to solutions/496. Next Greater Element I.md diff --git a/5. Longest Palindromic Substring.md b/solutions/5. Longest Palindromic Substring.md similarity index 100% rename from 5. Longest Palindromic Substring.md rename to solutions/5. Longest Palindromic Substring.md diff --git a/500. Keyboard Row.md b/solutions/500. Keyboard Row.md similarity index 100% rename from 500. Keyboard Row.md rename to solutions/500. Keyboard Row.md diff --git a/53. Maximum Subarray.md b/solutions/53. Maximum Subarray.md similarity index 100% rename from 53. Maximum Subarray.md rename to solutions/53. Maximum Subarray.md diff --git a/532. K-diff Pairs in an Array.md b/solutions/532. K-diff Pairs in an Array.md similarity index 100% rename from 532. K-diff Pairs in an Array.md rename to solutions/532. K-diff Pairs in an Array.md diff --git a/561. Array Partition I.md b/solutions/561. Array Partition I.md similarity index 100% rename from 561. Array Partition I.md rename to solutions/561. Array Partition I.md diff --git a/566. Reshape the Matrix.md b/solutions/566. Reshape the Matrix.md similarity index 100% rename from 566. Reshape the Matrix.md rename to solutions/566. Reshape the Matrix.md diff --git a/58. Length of Last Word.md b/solutions/58. Length of Last Word.md similarity index 100% rename from 58. Length of Last Word.md rename to solutions/58. Length of Last Word.md diff --git a/581. Shortest Unsorted Continuous Subarray.md b/solutions/581. Shortest Unsorted Continuous Subarray.md similarity index 100% rename from 581. Shortest Unsorted Continuous Subarray.md rename to solutions/581. Shortest Unsorted Continuous Subarray.md diff --git a/6. ZigZag Conversion.md b/solutions/6. ZigZag Conversion.md similarity index 100% rename from 6. ZigZag Conversion.md rename to solutions/6. ZigZag Conversion.md diff --git a/605. Can Place Flowers.md b/solutions/605. Can Place Flowers.md similarity index 100% rename from 605. Can Place Flowers.md rename to solutions/605. Can Place Flowers.md diff --git a/628. Maximum Product of Three Numbers.md b/solutions/628. Maximum Product of Three Numbers.md similarity index 100% rename from 628. Maximum Product of Three Numbers.md rename to solutions/628. Maximum Product of Three Numbers.md diff --git a/643. Maximum Average Subarray I.md b/solutions/643. Maximum Average Subarray I.md similarity index 100% rename from 643. Maximum Average Subarray I.md rename to solutions/643. Maximum Average Subarray I.md diff --git a/66. Plus One.md b/solutions/66. Plus One.md similarity index 100% rename from 66. Plus One.md rename to solutions/66. Plus One.md diff --git a/661. Image Smoother.md b/solutions/661. Image Smoother.md similarity index 100% rename from 661. Image Smoother.md rename to solutions/661. Image Smoother.md diff --git a/665. Non-decreasing Array.md b/solutions/665. Non-decreasing Array.md similarity index 100% rename from 665. Non-decreasing Array.md rename to solutions/665. Non-decreasing Array.md diff --git a/67. Add Binary.md b/solutions/67. Add Binary.md similarity index 100% rename from 67. Add Binary.md rename to solutions/67. Add Binary.md diff --git a/69. Sqrt(x).md b/solutions/69. Sqrt(x).md similarity index 100% rename from 69. Sqrt(x).md rename to solutions/69. Sqrt(x).md diff --git a/7. Reverse Integer.md b/solutions/7. Reverse Integer.md similarity index 100% rename from 7. Reverse Integer.md rename to solutions/7. Reverse Integer.md diff --git a/70. Climbing Stairs.md b/solutions/70. Climbing Stairs.md similarity index 100% rename from 70. Climbing Stairs.md rename to solutions/70. Climbing Stairs.md diff --git a/8. String to Integer (atoi).md b/solutions/8. String to Integer (atoi).md similarity index 100% rename from 8. String to Integer (atoi).md rename to solutions/8. String to Integer (atoi).md diff --git a/83. Remove Duplicates from Sorted List.md b/solutions/83. Remove Duplicates from Sorted List.md similarity index 100% rename from 83. Remove Duplicates from Sorted List.md rename to solutions/83. Remove Duplicates from Sorted List.md diff --git a/88. Merge Sorted Array.md b/solutions/88. Merge Sorted Array.md similarity index 100% rename from 88. Merge Sorted Array.md rename to solutions/88. Merge Sorted Array.md diff --git a/9. Palindrome Number.md b/solutions/9. Palindrome Number.md similarity index 100% rename from 9. Palindrome Number.md rename to solutions/9. Palindrome Number.md