Skip to content

Latest commit

 

History

History

Medium

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3. Digit Counts
4. Ugly Number II
5. Kth Largest Element
7. Serialize and Deserialize Binary Tree
10. String Permutation II
11. Search Range in Binary Search Tree
12. Min Stack
15. Permutations
16. Permutations II
17. Subsets
18. Subsets II
29. Interleaving String
31. Partition Array
32. Minimum Window Substring
33. N-Queens
34. N-Queens II
36. Reverse Linked List II
38. Search a 2D Matrix II
40. Implement Queue by Two Stacks
42. Maximum Subarray II
45. Maximum Subarray Difference
47. Majority Element II
48. Majority Number III
49. Sort Letters by Case
51. Previous Permutation
52. Next Permutation
57. 3Sum
58. 4Sum
59. 3Sum Closest
61. Search for a Range
62. Search in Rotated Sorted Array
63. Search in Rotated Sorted Array II
70. Binary Tree Level Order Traversal II
71. Binary Tree Zigzag Level Order Traversal
72. Construct Binary Tree from Inorder and Postorder Traversal
73. Construct Binary Tree from Preorder and Inorder Traversal
74. First Bad Version
75. Find Peak Element
76. Longest Increasing Subsequence
77. Longest Common Subsequence
78. Longest Common Prefix
79. Longest Common Substring
83. Single Number II
84. Single Number III
88. Lowest Common Ancestor of a Binary Tree
90. k Sum II
91. Minimum Adjustment Cost
92. Backpack
94. Binary Tree Maximum Path Sum
95. Validate Binary Search Tree
98. Sort List
99. Reorder List
102. Linked List Cycle
104. Merge K Sorted Lists
105. Copy List with Random Pointer
106. Convert Sorted List to Binary Search Tree
107. Word Break
108. Palindrome Partitioning II
113. Remove Duplicates from Sorted List II
116. Jump Game
117. Jump Game II
118. Distinct Subsequences
119. Edit Distance
120. Word Ladder
123. Word Search
124. Longest Consecutive Sequence
125. Backpack II
127. Topological Sorting
129. Rehashing
130. Heapify
135. Combination Sum
136. Palindrome Partitioning
137. Clone Graph
139. Subarray Sum Closest
140. Fast Power
143. Sort Colors II
144. Interleaving Positive and Negative Numbers
148. Sort Colors
149. Best Time to Buy and Sell Stock
150. Best Time to Buy and Sell Stock II
151. Best Time to Buy and Sell Stock III
152. Combinations
153. Combination Sum II
159. Find Minimum in Rotated Sorted Array
160. Find Minimum in Rotated Sorted Array II
161. Rotate Image
162. Set Matrix Zeroes
163. Unique Binary Search Trees
164. Unique Binary Search Trees II
169. Tower of Hanoi
170. Rotate List
171. Anagrams
176. Route Between Two Nodes in Graph
178. Graph Valid Tree
179. Update Bits
182. Delete Digits
184. Largest Number
186. Max Points on a Line
187. Gas Station
189. First Missing Positive
190. Next Permutation II
191. Maximum Product Subarray
196. Missing Number
198. Permutation Index II
200. Longest Palindromic Substring
201. Segment Tree Build
202. Segment Tree Query
203. Segment Tree Modify
205. Interval Minimum Number
206. Interval Sum
208. Assignment Operator Overloading (C++ Only)
221. Add Two Numbers II
223. Palindrome Linked List
224. Implement Three Stacks by Single Array
229. Stack Sorting
232. Tiny Url
233. Next Smaller and Larger Number with the Same 1 Bits
247. Segment Tree Query II
248. Count of Smaller Number
279. Number of Ways to Represent N Cents
363. Trapping Rain Water
371. Print Numbers by Recursion
374. Spiral Matrix
378. Convert Binary Search Tree to Doubly Linked List
379. Reorder array to construct the minimum number
380. Intersection of Two Linked Lists
381. Spiral Matrix II
382. Triangle Count
383. Container With Most Water
384. Longest Substring Without Repeating Characters
386. Longest Substring with At Most K Distinct Characters
387. The Smallest Difference
388. Permutation Sequence
391. Number of Airplanes in the Sky
392. House Robber
394. Coins in a Line
395. Coins in a Line II
399. Nuts & Bolts Problem
401. Kth Smallest Number in Sorted Matrix
402. Continuous Subarray Sum
403. Continuous Subarray Sum II
405. Submatrix Sum
406. Minimum Size Subarray Sum
411. Gray Code
414. Divide Two Integers
418. Integer to Roman
419. Roman to Integer
421. Simplify Path
424. Evaluate Reverse Polish Notation
425. Letter Combinations of a Phone Number
426. Restore IP Addresses
427. Generate Parentheses
428. Pow(x, n)
431. Connected Component in Undirected Graph
432. Find the Weak Connected Component in the Directed Graph
434. Number of Islands II
436. Maximal Square
439. Segment Tree Build II
442. Implement Trie (Prefix Tree)
443. Two Sum - Greater than target
447. Search in a Big Sorted Array
448. Inorder Successor in BST
460. Find K Closest Elements
461. Kth Smallest Numbers in Unsorted Array
471. Top K Frequent Words
473. Add and Search Word - Data structure design
475. Binary Tree Maximum Path Sum II
476. Stone Game
477. Surrounded Regions
486. Merge K Sorted Arrays
501. Design Twitter
502. Mini Cassandra
503. Anagram (Map Reduce)
504. Inverted Index (Map Reduce)
505. Web Logger
507. Wiggle Sort II
508. Wiggle Sort
511. Swap Two Nodes in Linked List
512. Decode Ways
513. Perfect Squares
515. Paint House
518. Super Ugly Number
520. Consistent Hashing II
522. Tiny Url II
523. Url Parser
525. Mini Uber
526. Load Balancer
528. Flatten Nested List Iterator
529. Geohash
530. Geohash II
531. Six Degrees
532. Reverse Pairs
533. Two Sum - Closest to target
534. House Robber II
535. House Robber III
538. Memcache
540. Zigzag Iterator
541. Zigzag Iterator II
544. Top k Largest Numbers
545. Top k Largest Numbers II
549. Top K Frequent Words (Map Reduce)
553. Bomb Enemy
555. Counting Bloom Filter
556. Standard Bloom Filter
559. Trie Service
562. Backpack IV
563. Backpack V
564. Combination Sum IV
565. Heart Beat
566. GFS Client
570. Find the Missing Number II
575. Decode String
577. Merge K Sorted Interval Lists
578. Lowest Common Ancestor III
581. Longest Repeating Subsequence
584. Drop Eggs II
585. Maximum Number in Mountain Sequence
586. Sqrt(x) II
587. Two Sum - Unique pairs
588. Partition Equal Subset Sum
589. Connecting Graph
590. Connecting Graph II
591. Connecting Graph III
593. Stone Game II
598. Zombie in Matrix
601. Flatten 2D Vector
603. Largest Divisible Subset
605. Sequence Reconstruction
606. Kth Largest Element II
608. Two Sum II - Input array is sorted
609. Two Sum - Less than or equal to target
610. Two Sum - Difference equals to target
611. Knight Shortest Path
612. K Closest Points
613. High Five
614. Binary Tree Longest Consecutive Sequence II
615. Course Schedule
616. Course Schedule II
617. Maximum Average Subarray II
618. Search Graph Nodes
619. Binary Tree Longest Consecutive Sequence III
620. Maximum Subarray IV
624. Remove Substrings
625. Partition Array II
630. Knight Shortest Path II
631. Maximal Square II
633. Find the Duplicate Number
636. 132 Pattern
640. One Edit Distance
641. Missing Ranges
643. Longest Absolute File Path
645. Find the Celebrity
648. Unique Word Abbreviation
649. Binary Tree Upside Down
650. Find Leaves of Binary Tree
651. Binary Tree Vertical Order Traversal
652. Factorization
654. Sparse Matrix Multiplication
656. Multiply Strings
657. Insert Delete GetRandom O(1)
659. Encode and Decode Strings
663. Walls and Gates
664. Counting Bits
665. Range Sum Query 2D - Immutable
666. Guess Number Higher or Lower II
667. Longest Palindromic Subsequence
668. Ones and Zeroes
669. Coin Change
670. Predict the Winner
677. Number of Big Islands
678. Shortest Palindrome
681. First Missing Prime Number
683. Word Break III
685. First Unique Number In Stream
688. The Number In Words
689. Two Sum IV - Input is a BST
691. Recover Binary Search Tree
692. Sliding Window Unique Elements Sum
698. Maximum Distance in Arrays
700. Cutting a Rod
701. Trim a Binary Search Tree
704. Bulb Switcher II
706. Binary Watch
714. Black Jack OO Design
717. Tree Longest Path With Same Value
718. Repeat String
719. Calculate Maximum Value
723. Rotate Bits - Left
724. Minimum Partition
726. Check Full Binary Tree
728. Three Distinct Factors
729. Last Digit By Factorial Divide
734. Number of Subsequences of Form a^i b^j c^k
735. Replace With Greatest From Right
740. Coin Change 2
741. Calculate Maximum Value II
742. Self Dividing Numbers
743. Monotone Increasing Digits
744. Sum of first K even-length Palindrome numbers
747. Coffee Maker OO Design
748. Kindle OO Design
750. Portal
751. John's business
752. Rogue Knight Sven
761. Smallest Subset
772. Group Anagrams
774. Repeated DNA
776. Strobogrammatic Number II
778. Pacific Atlantic Water Flow
779. Generalized Abbreviation
782. AND and OR
785. Maximum Weighted Sum Path
787. The Maze
788. The Maze II
790. Parser
791. Merge Number
793. Intersection of Arrays
798. Backpack VII
799. Backpack VIII
800. Backpack IX
801. Backpack X
805. Maximum Association Set
806. Buy Fruits
808. Movie Network
814. Shortest Path in Undirected Graph
817. Range Sum Query 2D - Mutable
819. Word Sorting
820. Rectangle
821. Time Intersection
824. Single Number IV
831. 3Sum II
832. Count Negative Number
833. Process Sequence
840. Range Sum Query - Mutable
842. Origami
843. Digital Flip
851. Pour Water
853. Number Of Corner Rectangles
854. Closest Leaf in a Binary Tree
858. Candy Crush
860. Number of Distinct Islands
862. Next Closest Time
863. Binary Tree Path Sum IV
864. Equal Tree Partition
867. 4 Keys Keyboard
869. Find the Derangement of An Array
871. Minimum Factorization
872. Kill Process
873. Squirrel Simulation
875. Longest Line of Consecutive One in Matrix
876. Split Concatenated Strings
877. Split Array with Equal Sum
878. Boundary of Binary Tree
879. Output Contest Matches
880. Construct Binary Tree from String
883. Max Consecutive Ones II
884. Find Permutation
886. Convex Polygon
887. Ternary Expression Parser
889. Sentence Screen Fitting
894. Pancake Sorting
896. Prime Product
898. Leftmost One
902. Kth Smallest Element in a BST
903. Range Addition
904. Plus One Linked List
906. Sort Transformed Array
908. Line Reflection
909. Android Unlock Patterns
911. Maximum Size Subarray Sum Equals k
913. Flip Game II
915. Inorder Predecessor in BST
917. Palindrome Permutation II
918. 3Sum Smaller
919. Meeting Rooms II
921. Count Univalue Subtrees
927. Reverse Words in a String II
931. Median of K Sorted Arrays
933. Tuple Multiply
934. Unlock Problem
935. Cartesian Product
939. Binary Tree Kth Floor Node
940. Maximum Absolute Value
944. Maximum Submatrix
945. Task Scheduler
946. 233 Matrix
953. The Biggest Score On The Tree
955. Implement Queue by Circular Array
959. K Spaced Array Sorting
960. First Unique Number in a Stream II
969. Longest Repeating Substring
972. Deliver The Message
974. 01 Matrix
975. 2 Keys Keyboard
976. 4Sum II
979. Additive Number
980. Basic Calculator II
982. Arithmetic Slices
986. Battleships in a Board
989. Array Nesting
990. Beautiful Arrangement
991. Bulb Switcher
992. Beautiful Arrangement II
994. Contiguous Array
995. Best Time to Buy and Sell Stock with Cooldown
996. Maximum Slope Straight Line
997. Print Organization Chart
1000. Best Time to Buy and Sell Stock with Transaction Fee
1001. Asteroid Collision
1003. Binary Tree Pruning
1008. Expressive Words
1010. Max Increase to Keep City Skyline
1015. Find Eventual Safe States
1016. Minimum Swaps To Make Sequences Increasing
1018. Champagne Tower
1020. All Paths From Source to Target
1021. Number of Subarrays with Bounded Maximum
1022. Valid Tic-Tac-Toe State
1024. Number of Matching Subsequences
1026. Domino and Tromino Tiling
1027. Escape The Ghosts
1029. Cheapest Flights Within K Stops
1031. Is Graph Bipartite?
1035. Rabbits in Forest
1037. Global and Local Inversions
1039. Max Chunks To Make Sorted
1044. Largest Plus Sign
1045. Partition Labels
1049. Pyramid Transition Matrix
1052. Shortest Completing Word
1057. Network Delay Time
1059. Delete and Earn
1060. Daily Temperatures
1064. My Calendar II
1065. My Calendar I
1066. Verify Preorder Serialization of a Binary Tree
1069. Remove Comments
1070. Accounts Merge
1075. Subarray Product Less Than K
1076. Minimum ASCII Delete Sum for Two Strings
1088. Redundant Connection
1089. Valid Parenthesis String
1090. Map Sum Pairs
1093. Number of Longest Increasing Subsequence
1095. Maximum Swap
1101. Maximum Width of Binary Tree
1103. Split Array into Consecutive Subsequences
1105. Print Binary Tree
1106. Maximum Binary Tree
1109. Dota2 Senate
1110. Replace Words
1113. Solve the Equation
1114. Shopping Offers
1116. Exclusive Time of Functions
1122. Add One Row to Tree
1127. Add Bold Tag in String
1132. Valid Triangle Number
1134. Find Duplicate File in System
1149. Valid Square
1150. Fraction Addition and Subtraction
1156. Delete Operation for Two Strings
1164. Wiggle Subsequence
1169. Permutation in String
1174. Next Greater Element III
1176. Optimal Division
1183. Single Element in a Sorted Array
1184. Minimum Time Difference
1185. Complex Number Multiplication
1190. Longest Word in Dictionary through Deleting
1191. Longest Uncommon Subsequence II
1195. Find Largest Value in Each Tree Row
1197. Find Bottom Left Tree Value
1198. Most Frequent Subtree Sum
1201. Next Greater Element II
1205. Diagonal Traverse
1207. Teemo Attacking
1208. Target Sum
1210. Increasing Subsequences
1215. Magical String
1217. Total Hamming Distance
1220. Matchsticks to Square
1222. Validate IP Address
1223. Unique Substrings in Wraparound String
1226. Minimum Moves to Equal Array Elements II
1229. Circular Array Loop
1232. Minimum Number of Arrows to Burst Balloons
1238. Find All Duplicates in an Array
1242. Non-overlapping Intervals
1244. Minimum Genetic Mutation
1246. Longest Repeating Character Replacement
1247. Reconstruct Original Digits from English
1248. Maximum XOR of Two Numbers in an Array
1252. Queue Reconstruction by Height
1255. Remove K Digits
1259. Integer Replacement
1260. Rotate Function
1261. Longest Substring with At Least K Repeating Characters
1262. UTF-8 Validation
1263. Is Subsequence
1265. Elimination Game
1272. Kth Smallest Element in a Sorted Matrix
1275. Super Pow
1277. Water and Jug Problem
1279. Count Numbers with Unique Digits
1284. Integer Break
1287. Increasing Triplet Subsequence
1292. Odd Even Linked List
1296. Maximum Product of Word Lengths
1298. Minimum Height Trees
1304. H-Index
1307. Verify Preorder Sequence in Binary Search Tree
1308. Factor Combinations
1309. Different Ways to Add Parentheses
1310. Product of Array Except Self
1315. Summary Ranges
1317. Count Complete Tree Nodes
1318. Contains Duplicate III
1325. Bitwise AND of Numbers Range
1335. Repeated DNA Sequences
1351. Fraction to Recurring Decimal
1352. Compare Version Numbers
1353. Sum Root to Leaf Numbers
1363. ZigZag Conversion
1366. Directed Graph Loop
1367. Police Distance
1374. Shortest Distance in 3D Space
1375. Substring With At Least K Distinct Characters
1376. Equivalent Strings
1377. Find Substring
1378. Minimum String Array Coverage
1382. High Capacity Backpack
1396. Set Union
1397. Digital Coverage
1399. Take Coins
1402. Recommend Friends
1403. Maximum Product Path
1409. Matrix Finding Number
1411. Edit Distance - Replace Edition
1412. Pick Three Numbers
1413. Tree
1416. The Previous Number
1442. Order Problem
1444. Dyeing Problem
1446. 01 Matrix Walking Problem
1448. Card Game
1454. Word Frequency Count
1457. Search Subarray
1458. Minimum Submatrix
1463. Paper Review
1465. Order Of Tasks
1466. Best Shopping Plan
1467. Ask For Cooling Time
1469. Longest Path On The Tree
1470. The Game Of Take Numbers
1473. Find The Sum Of The Array
1474. Shortest Phrase
1481. Unique Substring
1482. Minimum Sum Path
1484. The Most Frequent word
1487. Judging Triangle
1489. The Largest Sum Of The Matrix Boundary Elements
1538. Card Game II
1539. Flipped the Pixel
1542. NextTime Norepeat
1543. Unique Path IV
1545. Last Closest Time
1552. Parking Problem
1553. Climbing Stairs III
1554. LastTime Norepeat