/leetcode

leetcode solutions

Primary LanguageJava

leetcode

This repo is leetcode solutions in Java. Also include algs4.jar library for textbook: Robert Sedgewick and Kevin Wayne - Algorithms, 4th edition

[W] - white list, easy and one time pass.
[L] - light grey, easy but with few corner cases.
[G] - grey list, intricate corner cases.
[B] - black list, brilliant and intellectual challenge solution.
[L] 0001. Two Sum
[W] 0002. Add Two Numbers
[B] 0003. Longest Substring Without Repeating Characters
[B] 0004. Median of Two Sorted Arrays
[B] 0005. Longest Palindromic Substring
[L] 0006. ZigZag Conversion
[G] 0007. Reverse Integer
[W] 0008. String to Integer (atoi)
[G] 0009. Palindrome Number
[G] 0010. Regular Expression Matching
[B] 0011. Container With Most Water
[G] 0012. Integer to Roman
[W] 0013. Roman to Integer
[W] 0014. Longest Common Prefix
[B] 0015. 3Sum
[B] 0016. 3Sum Closest
[W] 0017. Letter Combinations of a Phone Number
[B] 0018. 4Sum
[B] 0019. Remove Nth Node From End of List
[W] 0020. Valid Parentheses
[W] 0021. Merge Two Sorted Lists
[L] 0022. Generate Parentheses
[B] 0023. Merge k Sorted Lists
[W] 0024. Swap Nodes in Pairs
[W] 0025. Reverse Nodes in k-Group
[W] 0026. Remove Duplicates from Sorted Array
[W] 0027. Remove Element
[W] 0028. Implement strStr()
[G] 0029. Divide Two Integers
[G] 0030. Substring with Concatenation of All Words
[B] 0031. Next Permutation
[B] 0032. Longest Valid Parentheses
[B] 0033. Search in Rotated Sorted Array
[B] 0034. Find First and Last Position of Element in Sorted Array
[W] 0035. Search Insert Position
[B] 0036. Valid Sudoku
[W] 0037. Sudoku Solver
[W] 0038. Count and Say
[L] 0039. Combination Sum
[L] 0040. Combination Sum II
[B] 0041. First Missing Positive
[B] 0042. Trapping Rain Water
[B] 0043. Multiply Strings
[B] 0044. Wildcard Matching
[B] 0045. Jump Game II
[B] 0046. Permutations
[L] 0047. Permutations II
[W] 0048. Rotate Image
[W] 0049. Group Anagrams
[L] 0050. Pow(x, n)
[W] 0051. N-Queens
[W] 0052. N-Queens II
[B] 0053. Maximum Subarray
[G] 0054. Spiral Matrix
[W] 0055. Jump Game
[W] 0056. Merge Intervals
[L] 0057. Insert Interval
[L] 0058. Length of Last Word
[W] 0059. Spiral Matrix II
[B] 0060. Permutation Sequence
[W] 0061. Rotate List
[B] 0062. Unique Paths
[B] 0063. Unique Paths II
[W] 0064. Minimum Path Sum
[G] 0065. Valid Number
[L] 0066. Plus One
[L] 0067. Add Binary
[G] 0068. Text Justification
[L] 0069. Sqrt(x)
[L] 0070. Climbing Stairs
[G] 0071. Simplify Path
[B] 0072. Edit Distance
[L] 0073. Set Matrix Zeroes
[W] 0074. Search a 2D Matrix
[W] 0075. Sort Colors
[W] 0076. Minimum Window Substring
[W] 0077. Combinations
[W] 0078. Subsets
[W] 0079. Word Search
[W] 0080. Remove Duplicates from Sorted Array II
[L] 0081. Search in Rotated Sorted Array II
[L] 0082. Remove Duplicates from Sorted List II
[W] 0083. Remove Duplicates from Sorted List
[B] 0084. Largest Rectangle in Histogram
[B] 0085. Maximal Rectangle
[W] 0086. Partition List
[B] 0087. Scramble String
[W] 0088. Merge Sorted Array
[B] 0089. Gray Code
[G] 0091. Decode Ways
[W] 0092. Reverse Linked List II
[G] 0093. Restore IP Addresses
[W] 0094. Binary Tree Inorder Traversal
[B] 0095. Unique Binary Search Trees II
[W] 0096. Unique Binary Search Trees
[B] 0097. Interleaving String
[L] 0098. Validate Binary Search Tree
[B] 0099. Recover Binary Search Tree
[W] 0100. Same Tree
[L] 0101. Symmetric Tree
[L] 0102. Binary Tree Level Order Traversal
[L] 0103. Binary Tree Zigzag Level Order Traversal
[W] 0104. Maximum Depth of Binary Tree
[W] 0105. Construct Binary Tree from Preorder and Inorder Traversal
[W] 0106. Construct Binary Tree from Inorder and Postorder Traversal
[W] 0107. Binary Tree Level Order Traversal II
[W] 0108. Convert Sorted Array to Binary Search Tree
[B] 0109. Convert Sorted List to Binary Search Tree
[G] 0110. Balanced Binary Tree
[L] 0111. Minimum Depth of Binary Tree
[L] 0112. Path Sum
[W] 0113. Path Sum II
[B] 0114. Flatten Binary Tree to Linked List
[B] 0115. Distinct Subsequences
[W] 0116. Populating Next Right Pointers in Each Node
[B] 0117. Populating Next Right Pointers in Each Node II
[W] 0118. Pascal's Triangle
[W] 0119. Pascal's Triangle II
[G] 0120. Triangle
[W] 0121. Best Time to Buy and Sell Stock
[B] 0122. Best Time to Buy and Sell Stock II
[B] 0123. Best Time to Buy and Sell Stock III
[W] 0125. Valid Palindrome
[G] 0126. Word Ladder II
[G] 0127. Word Ladder
[W] 0128. Longest Consecutive Sequence
[W] 0129. Sum Root to Leaf Numbers
[L] 0130. Surrounded Regions
[L] 0131. Palindrome Partitioning
[G] 0132. Palindrome Partitioning II
[G] 0133. Clone Graph
[B] 0134. Gas Station
[B] 0135. Candy
[W] 0136. Single Number
[B] 0137. Single Number II
[B] 0138. Copy List with Random Pointer
[B] 0139. Word Break
[G] 0140. Word Break II
[W] 0141. Linked List Cycle
[B] 0142. Linked List Cycle II
[L] 0143. Reorder List
[L] 0144. Binary Tree Preorder Traversal
[W] 0145. Binary Tree Postorder Traversal
[G] 0146. LRU Cache
[W] 0147. Insertion Sort List
[G] 0148. Sort List
[G] 0149. Max Points on a Line
[W] 0150. Evaluate Reverse Polish Notation
[L] 0151. Reverse Words in a String
[B] 0152. Maximum Product Subarray
[W] 0153. Find Minimum in Rotated Sorted Array
[B] 0155. Min Stack
[W] 0160. Intersection of Two Linked Lists
[W] 0162. Find Peak Element
[B] 0164. Maximum Gap
[L] 0165. Compare Version Numbers
[G] 0166. Fraction to Recurring Decimal
[B] 0167. Two Sum II - Input array is sorted
[L] 0168. Excel Sheet Column Title
[B] 0169. Majority Element [moore voting]
[W] 0171. Excel Sheet Column Number
[W] 0172. Factorial Trailing Zeroes
[W] 0173. Binary Search Tree Iterator
[L] 0174. Dungeon Game
[W] 0175. Combine Two Tables
[W] 0176. Second Highest Salary
[W] 0177. Nth Highest Salary
[B] 0179. Largest Number
[W] 0180. Consecutive Numbers
[W] 0181. Employees Earning More Than Their Managers
[W] 0182. Duplicate Emails
[W] 0183. Customers Who Never Order
[W] 0184. Department Highest Salary
[W] 0185. Department Top Three Salaries
[B] 0187. Repeated DNA Sequences
[B] 0188. Best Time to Buy and Sell Stock IV
[B] 0189. Rotate Array [O(1) space, O(n) time]
[L] 0190. Reverse Bits
[W] 0191. Number of 1 Bits
[W] 0192. Word Frequency
[W] 0193. Valid Phone Numbers
[W] 0194. Transpose File
[W] 0195. Tenth Line
[W] 0196. Delete Duplicate Emails
[W] 0197. Rising Temperature
[G] 0198. House Robber
[L] 0199. Binary Tree Right Side View
[L] 0200. Number of Islands
[B] 0201. Bitwise AND of Numbers Range
[B] 0202. Happy Number
[L] 0203. Remove Linked List Elements
[G] 0204. Count Primes
[L] 0205. Isomorphic Strings
[L] 0206. Reverse Linked List
[L] 0207. Course Schedule
[W] 0208. Implement Trie (Prefix Tree)
[W] 0209. Minimum Size Subarray Sum
[B] 0210. Course Schedule II
[L] 0211. Add and Search Word - Data structure design
[G] 0212. Word Search II
[B] 0213. House Robber II
[B] 0214. Shortest Palindrome
[B] 0215. Kth Largest Element in an Array
[W] 0216. Combination Sum III
[W] 0217. Contains Duplicate
[B] 0218. The Skyline Problem
[W] 0219. Contains Duplicate II
[B] 0220. Contains Duplicate III
[L] 0221. Maximal Square
[W] 0222. Count Complete Tree Nodes
[W] 0223. Rectangle Area
[W] 0224. Basic Calculator
[W] 0225. Implement Stack using Queues
[W] 0226. Invert Binary Tree
[G] 0227. Basic Calculator II
[G] 0228. Summary Ranges
[B] 0229. Majority Element II
[W] 0230. Kth Smallest Element in a BST
[W] 0231. Power of Two
[L] 0232. Implement Queue using Stacks
[B] 0233. Number of Digit One
[G] 0234. Palindrome Linked List
[L] 0235. Lowest Common Ancestor of a Binary Search Tree
[B] 0236. Lowest Common Ancestor of a Binary Tree
[L] 0237. Delete Node in a Linked List
[W] 0238. Product of Array Except Self
[B] 0239. Sliding Window Maximum
[B] 0240. Search a 2D Matrix II
[G] 0241. Different Ways to Add Parentheses
[W] 0242. Valid Anagram
[L] 0257. Binary Tree Paths
[W] 0258. Add Digits
[B] 0260. Single Number III
[W] 0262. Trips and Users
[W] 0263. Ugly Number
[B] 0264. Ugly Number II
[W] 0268. Missing Number
[W] 0273. Integer to English Words
[G] 0274. H-Index
[G] 0275. H-Index II
[L] 0278. First Bad Version
[G] 0279. Perfect Squares
[G] 0282. Expression Add Operators
[L] 0283. Move Zeroes
[W] 0284. Peeking Iterator
[B] 0287. Find the Duplicate Number
[W] 0289. Game of Life
[W] 0290. Word Pattern
[W] 0292. Nim Game
[L] 0295. Find Median from Data Stream
[W] 0297. Serialize and Deserialize Binary Tree
[W] 0299. Bulls and Cows
[B] 0300. Longest Increasing Subsequence
[B] 0301. Remove Invalid Parentheses
[W] 0303. Range Sum Query - Immutable
[W] 0304. Range Sum Query 2D - Immutable
[G] 0306. Additive Number
[B] 0307. Range Sum Query - Mutable
[B] 0309. Best Time to Buy and Sell Stock with Cooldown
[B] 0310. Minimum Height Trees
[B] 0312. Burst Balloons
[W] 0313. Super Ugly Number
[B] 0315. Count of Smaller Numbers After Self
[B] 0316. Remove Duplicate Letters
[L] 0318. Maximum Product of Word Lengths
[B] 0319. Bulb Switcher
[B] 0321. Create Maximum Number
[L] 0322. Coin Change
[B] 0324. Wiggle Sort II
[B] 0326. Power of Three
[B] 0327. Count of Range Sum
[W] 0329. Longest Increasing Path in a Matrix
[B] 0330. Patching Array
[L] 0331. Verify Preorder Serialization of a Binary Tree
[L] 0332. Reconstruct Itinerary
[L] 0334. Increasing Triplet Subsequence
[B] 0335. Self Crossing
[W] 0336. Palindrome Pairs
[W] 0337. House Robber III
[B] 0338. Counting Bits
[L] 0341. Flatten Nested List Iterator
[B] 0342. Power of Four
[W] 0343. Integer Break
[W] 0344. Reverse String
[L] 0345. Reverse Vowels of a String
[L] 0347. Top K Frequent Elements
[W] 0349. Intersection of Two Arrays
[L] 0350. Intersection of Two Arrays II
[W] 0352. Data Stream as Disjoint Intervals
[L] 0354. Russian Doll Envelopes
[G] 0355. Design Twitter
[L] 0357. Count Numbers with Unique Digits
[B] 0363. Max Sum of Rectangle No Larger Than K
[B] 0365. Water and Jug Problem
[W] 0367. Valid Perfect Square
[B] 0368. Largest Divisible Subset
[W] 0371. Sum of Two Integers
[B] 0372. Super Pow
[B] 0373. Find K Pairs with Smallest Sums
[W] 0374. Guess Number Higher or Lower
[B] 0375. Guess Number Higher or Lower II
[L] 0376. Wiggle Subsequence
[G] 0377. Combination Sum IV
[B] 0378. Kth Smallest Element in a Sorted Matrix
[W] 0380. Insert Delete GetRandom O(1)
[W] 0381. Insert Delete GetRandom O(1) - Duplicates allowed
[B] 0382. Linked List Random Node
[W] 0383. Ransom Note
[W] 0384. Shuffle an Array
[G] 0385. Mini Parser
[L] 0386. Lexicographical Numbers
[L] 0387. First Unique Character in a String
[G] 0388. Longest Absolute File Path
[W] 0389. Find the Difference
[W] 0390. Elimination Game
[G] 0391. Perfect Rectangle
[W] 0392. Is Subsequence
[W] 0393. UTF-8 Validation
[W] 0394. Decode String
[B] 0395. Longest Substring with At Least K Repeating Characters
[B] 0396. Rotate Function
[G] 0397. Integer Replacement
[W] 0398. Random Pick Index
[L] 0399. Evaluate Division
[G] 0400. Nth Digit
[L] 0401. Binary Watch
[G] 0402. Remove K Digits
[W] 0403. Frog Jump
[W] 0404. Sum of Left Leaves
[G] 0405. Convert a Number to Hexadecimal
[W] 0406. Queue Reconstruction by Height
[B] 0407. Trapping Rain Water II
[W] 0409. Longest Palindrome
[B] 0410. Split Array Largest Sum
[W] 0412. Fizz Buzz
[W] 0413. Arithmetic Slices
[L] 0414. Third Maximum Number
[W] 0415. Add Strings
[B] 0416. Partition Equal Subset Sum
[W] 0417. Pacific Atlantic Water Flow
[W] 0419. Battleships in a Board
[B] 0420. Strong Password Checker
[B] 0421. Maximum XOR of Two Numbers in an Array
[L] 0423. Reconstruct Original Digits from English
[B] 0424. Longest Repeating Character Replacement
[L] 0427. Construct Quad Tree
[W] 0429. N-ary Tree Level Order Traversal
[W] 0430. Flatten a Multilevel Doubly Linked List
[G] 0432. All O`one Data Structure
[L] 0433. Minimum Genetic Mutation
[W] 0434. Number of Segments in a String
[B] 0435. Non-overlapping Intervals
[B] 0436. Find Right Interval
[B] 0437. Path Sum III
[W] 0438. Find All Anagrams in a String
[G] 0440. K-th Smallest in Lexicographical Order
[G] 0441. Arranging Coins
[W] 0442. Find All Duplicates in an Array
[G] 0443. String Compression
[L] 0445. Add Two Numbers II
[B] 0446. Arithmetic Slices II - Subsequence
[L] 0447. Number of Boomerangs
[B] 0448. Find All Numbers Disappeared in an Array
[W] 0449. Serialize and Deserialize BST
[G] 0450. Delete Node in a BST
[W] 0451. Sort Characters By Frequency
[W] 0452. Minimum Number of Arrows to Burst Balloons
[B] 0453. Minimum Moves to Equal Array Elements
[B] 0454. 4Sum II
[W] 0455. Assign Cookies
[B] 0456. 132 Pattern
[G] 0457. Circular Array Loop
[B] 0458. Poor Pigs
[W] 0459. Repeated Substring Pattern
[B] 0460. LFU Cache
[W] 0461. Hamming Distance
[B] 0462. Minimum Moves to Equal Array Elements II
[W] 0463. Island Perimeter
[B] 0464. Can I Win
[G] 0466. Count The Repetitions
[B] 0467. Unique Substrings in Wraparound String
[G] 0468. Validate IP Address
[B] 0470. Implement Rand10() Using Rand7()
[B] 0472. Concatenated Words
[L] 0473. Matchsticks to Square
[B] 0474. Ones and Zeroes
[L] 0475. Heaters
[W] 0476. Number Complement
[W] 0477. Total Hamming Distance
[G] 0478. Generate Random Point in a Circle
[G] 0479. Largest Palindrome Product
[B] 0480. Sliding Window Median
[B] 0481. Magical String
[W] 0482. License Key Formatting
[W] 0483. Smallest Good Base
[L] 0485. Max Consecutive Ones
[G] 0486. Predict the Winner
[L] 0491. Increasing Subsequences
[W] 0492. Construct the Rectangle
[B] 0493. Reverse Pairs
[L] 0494. Target Sum
[W] 0495. Teemo Attacking
[B] 0496. Next Greater Element I
[W] 0497. Random Point in Non-overlapping Rectangles
[L] 0498. Diagonal Traverse
[W] 0500. Keyboard Row
[B] 0501. Find Mode in Binary Search Tree
[B] 0502. IPO
[B] 0503. Next Greater Element II
[W] 0504. Base 7
[W] 0506. Relative Ranks
[W] 0507. Perfect Number
[G] 0508. Most Frequent Subtree Sum
[W] 0509. Fibonacci Number
[W] 0513. Find Bottom Left Tree Value
[W] 0514. Freedom Trail
[W] 0515. Find Largest Value in Each Tree Row
[B] 0516. Longest Palindromic Subsequence
[B] 0517. Super Washing Machines
[B] 0518. Coin Change 2
[B] 0519. Random Flip Matrix
[L] 0520. Detect Capital
[W] 0521. Longest Uncommon Subsequence I
[B] 0522. Longest Uncommon Subsequence II
[B] 0523. Continuous Subarray Sum
[G] 0524. Longest Word in Dictionary through Deleting
[W] 0525. Contiguous Array
[L] 0526. Beautiful Arrangement
[W] 0528. Random Pick with Weight
[G] 0529. Minesweeper
[W] 0530. Minimum Absolute Difference in BST
[W] 0532. K-diff Pairs in an Array
[W] 0535. Encode and Decode TinyURL
[L] 0537. Complex Number Multiplication
[W] 0538. Convert BST to Greater Tree
[W] 0539. Minimum Time Difference
[B] 0540. Single Element in a Sorted Array
[W] 0541. Reverse String II
[W] 0542. 01 Matrix
[W] 0543. Diameter of Binary Tree
[B] 0546. Remove Boxes
[G] 0547. Friend Circles
[W] 0551. Student Attendance Record I
[G] 0552. Student Attendance Record II
[W] 0553. Optimal Division
[G] 0556. Next Greater Element III
[W] 0557. Reverse Words in a String III
[L] 0558. Quad Tree Intersection
[W] 0559. Maximum Depth of N-ary Tree
[W] 0560. Subarray Sum Equals K
[W] 0561. Array Partition I
[W] 0563. Binary Tree Tilt
[G] 0564. Find the Closest Palindrome
[W] 0565. Array Nesting
[W] 0566. Reshape the Matrix
[L] 0567. Permutation in String
[L] 0572. Subtree of Another Tree
[W] 0575. Distribute Candies
[G] 0576. Out of Boundary Paths
[L] 0581. Shortest Unsorted Continuous Subarray
[G] 0583. Delete Operation for Two Strings
[B] 0587. Erect the Fence
[W] 0589. N-ary Tree Preorder Traversal
[W] 0590. N-ary Tree Postorder Traversal
[G] 0591. Tag Validator
[G] 0592. Fraction Addition and Subtraction
[L] 0593. Valid Square
[W] 0594. Longest Harmonious Subsequence
[W] 0595. Big Countries
[W] 0596. Classes More Than 5 Students
[W] 0598. Range Addition II
[W] 0599. Minimum Index Sum of Two Lists
[G] 0600. Non-negative Integers without Consecutive Ones
[W] 0601. Human Traffic of Stadium
[L] 0605. Can Place Flowers
[W] 0606. Construct String from Binary Tree
[L] 0609. Find Duplicate File in System
[G] 0611. Valid Triangle Number
[W] 0617. Merge Two Binary Trees
[W] 0620. Not Boring Movies
[W] 0621. Task Scheduler
[L] 0622. Design Circular Queue
[W] 0623. Add One Row to Tree
[W] 0626. Exchange Seats
[W] 0627. Swap Salary
[B] 0628. Maximum Product of Three Numbers
[B] 0629. K Inverse Pairs Array
[B] 0630. Course Schedule III
[B] 0632. Smallest Range
[L] 0633. Sum of Square Numbers
[L] 0636. Exclusive Time of Functions
[L] 0637. Average of Levels in Binary Tree
[W] 0638. Shopping Offers
[W] 0640. Solve the Equation
[W] 0641. Design Circular Deque
[L] 0643. Maximum Average Subarray I
[W] 0645. Set Mismatch
[W] 0646. Maximum Length of Pair Chain
[W] 0647. Palindromic Substrings
[W] 0648. Replace Words
[W] 0649. Dota2 Senate
[L] 0650. 2 Keys Keyboard
[B] 0652. Find Duplicate Subtrees
[L] 0653. Two Sum IV - Input is a BST
[W] 0654. Maximum Binary Tree
[W] 0655. Print Binary Tree
[W] 0657. Robot Return to Origin
[L] 0658. Find K Closest Elements
[W] 0659. Split Array into Consecutive Subsequences
[W] 0661. Image Smoother
[W] 0662. Maximum Width of Binary Tree
[B] 0664. Strange Printer
[G] 0665. Non-decreasing Array
[B] 0667. Beautiful Arrangement II
[B] 0668. Kth Smallest Number in Multiplication Table
[W] 0669. Trim a Binary Search Tree
[G] 0670. Maximum Swap
[G] 0671. Second Minimum Node In a Binary Tree
[B] 0672. Bulb Switcher II
[G] 0673. Number of Longest Increasing Subsequence
[W] 0674. Longest Continuous Increasing Subsequence
[L] 0676. Implement Magic Dictionary
[W] 0677. Map Sum Pairs
[W] 0678. Valid Parenthesis String
[G] 0679. 24 Game
[G] 0680. Valid Palindrome II
[W] 0682. Baseball Game
[B] 0684. Redundant Connection
[B] 0685. Redundant Connection II
[L] 0686. Repeated String Match
[G] 0687. Longest Univalue Path
[L] 0688. Knight Probability in Chessboard
[L] 0689. Maximum Sum of 3 Non-Overlapping Subarrays
[W] 0690. Employee Importance
[W] 0691. Stickers to Spell Word
[G] 0692. Top K Frequent Words
[W] 0693. Binary Number with Alternating Bits
[W] 0695. Max Area of Island
[B] 0696. Count Binary Substrings
[W] 0697. Degree of an Array
[L] 0698. Partition to K Equal Sum Subsets
[L] 0699. Falling Squares
[W] 0700. Search in a Binary Search Tree
[W] 0701. Insert into a Binary Search Tree
[W] 0704. Binary Search
[W] 0705. Design HashSet
[W] 0706. Design HashMap
[G] 0707. Design Linked List
[W] 0709. To Lower Case
[W] 0710. Random Pick with Blacklist
[G] 0712. Minimum ASCII Delete Sum for Two Strings
[B] 0713. Subarray Product Less Than K
[L] 0714. Best Time to Buy and Sell Stock with Transaction Fee
[W] 0715. Range Module
[W] 0717. 1-bit and 2-bit Characters
[G] 0718. Maximum Length of Repeated Subarray
[B] 0719. Find K-th Smallest Pair Distance
[W] 0720. Longest Word in Dictionary
[L] 0721. Accounts Merge
[G] 0722. Remove Comments
[W] 0724. Find Pivot Index
[W] 0725. Split Linked List in Parts
[L] 0726. Number of Atoms
[W] 0728. Self Dividing Numbers
[W] 0729. My Calendar I
[W] 0730. Count Different Palindromic Subsequences
[B] 0731. My Calendar II
[B] 0732. My Calendar III
[L] 0733. Flood Fill
[L] 0735. Asteroid Collision
[W] 0736. Parse Lisp Expression
[W] 0738. Monotone Increasing Digits
[W] 0739. Daily Temperatures
[G] 0740. Delete and Earn
[B] 0741. Cherry Pickup
[G] 0743. Network Delay Time
[L] 0744. Find Smallest Letter Greater Than Target
[G] 0745. Prefix and Suffix Search
[L] 0746. Min Cost Climbing Stairs
[L] 0747. Largest Number At Least Twice of Others
[W] 0748. Shortest Completing Word
[B] 0749. Contain Virus
[L] 0752. Open the Lock
[B] 0753. Cracking the Safe
[B] 0754. Reach a Number
[L] 0756. Pyramid Transition Matrix
[B] 0761. Special Binary String
[W] 0762. Prime Number of Set Bits in Binary Representation
[W] 0763. Partition Labels
[W] 0764. Largest Plus Sign
[B] 0765. Couples Holding Hands
[W] 0766. Toeplitz Matrix
[G] 0767. Reorganize String
[B] 0768. Max Chunks To Make Sorted II
[G] 0769. Max Chunks To Make Sorted
[B] 0770. Basic Calculator IV
[W] 0771. Jewels and Stones
[L] 0773. Sliding Puzzle
[W] 0775. Global and Local Inversions
[B] 0777. Swap Adjacent in LR String
[W] 0778. Swim in Rising Water
[W] 0779. K-th Symbol in Grammar
[B] 0780. Reaching Points
[G] 0781. Rabbits in Forest
[B] 0782. Transform to Chessboard
[B] 0783. Minimum Distance Between BST Nodes
[W] 0784. Letter Case Permutation
[W] 0785. Is Graph Bipartite?
[B] 0786. K-th Smallest Prime Fraction
[L] 0787. Cheapest Flights Within K Stops
[B] 0788. Rotated Digits
[L] 0789. Escape The Ghosts
[G] 0790. Domino and Tromino Tiling
[W] 0791. Custom Sort String
[L] 0792. Number of Matching Subsequences
[B] 0793. Preimage Size of Factorial Zeroes Function
[L] 0794. Valid Tic-Tac-Toe State
[G] 0795. Number of Subarrays with Bounded Maximum
[B] 0796. Rotate String
[W] 0797. All Paths From Source to Target
[B] 0798. Smallest Rotation with Highest Score
[G] 0799. Champagne Tower
[L] 0801. Minimum Swaps To Make Sequences Increasing
[W] 0802. Find Eventual Safe States
[G] 0803. Bricks Falling When Hit
[W] 0804. Unique Morse Code Words
[B] 0805. Split Array With Same Average
[W] 0806. Number of Lines To Write String
[W] 0807. Max Increase to Keep City Skyline
[G] 0808. Soup Servings
[L] 0809. Expressive Words
[B] 0810. Chalkboard XOR Game
[W] 0811. Subdomain Visit Count
[W] 0812. Largest Triangle Area
[W] 0813. Largest Sum of Averages
[W] 0814. Binary Tree Pruning
[L] 0815. Bus Routes
[W] 0816. Ambiguous Coordinates
[W] 0817. Linked List Components
[B] 0818. Race Car
[L] 0819. Most Common Word
[W] 0820. Short Encoding of Words
[W] 0821. Shortest Distance to a Character
[W] 0822. Card Flipping Game
[L] 0823. Binary Trees With Factors
[W] 0824. Goat Latin
[G] 0825. Friends Of Appropriate Ages
[G] 0826. Most Profit Assigning Work
[B] 0827. Making A Large Island
[B] 0828. Unique Letter String
[G] 0829. Consecutive Numbers Sum
[W] 0830. Positions of Large Groups
[W] 0831. Masking Personal Information
[W] 0832. Flipping an Image
[W] 0833. Find And Replace in String
[B] 0834. Sum of Distances in Tree
[W] 0835. Image Overlap
[W] 0836. Rectangle Overlap
[B] 0837. New 21 Game
[G] 0838. Push Dominoes
[L] 0839. Similar String Groups
[W] 0840. Magic Squares In Grid
[W] 0841. Keys and Rooms
[G] 0842. Split Array into Fibonacci Sequence
[B] 0843. Guess the Word
[L] 0844. Backspace String Compare
[W] 0845. Longest Mountain in Array
[G] 0846. Hand of Straights
[B] 0847. Shortest Path Visiting All Nodes
[W] 0848. Shifting Letters
[L] 0849. Maximize Distance to Closest Person
[B] 0850. Rectangle Area II
[G] 0851. Loud and Rich
[W] 0852. Peak Index in a Mountain Array
[W] 0853. Car Fleet
[W] 0854. K-Similar Strings
[W] 0855. Exam Room
[W] 0856. Score of Parentheses
[B] 0857. Minimum Cost to Hire K Workers
[W] 0858. Mirror Reflection
[W] 0859. Buddy Strings
[W] 0860. Lemonade Change
[L] 0861. Score After Flipping Matrix
[B] 0862. Shortest Subarray with Sum at Least K
[W] 0863. All Nodes Distance K in Binary Tree
[B] 0864. Shortest Path to Get All Keys
[W] 0865. Smallest Subtree with all the Deepest Nodes
[B] 0866. Prime Palindrome
[W] 0867. Transpose Matrix
[W] 0868. Binary Gap
[W] 0869. Reordered Power of 2
[W] 0870. Advantage Shuffle
[B] 0871. Minimum Number of Refueling Stops
[L] 0872. Leaf-Similar Trees
[W] 0873. Length of Longest Fibonacci Subsequence
[G] 0874. Walking Robot Simulation
[W] 0875. Koko Eating Bananas
[W] 0876. Middle of the Linked List
[L] 0877. Stone Game
[B] 0878. Nth Magical Number
[B] 0879. Profitable Schemes
[G] 0880. Decoded String at Index
[W] 0881. Boats to Save People
[G] 0882. Reachable Nodes In Subdivided Graph
[W] 0883. Projection Area of 3D Shapes
[W] 0884. Uncommon Words from Two Sentences
[W] 0885. Spiral Matrix III
[W] 0886. Possible Bipartition
[B] 0887. Super Egg Drop
[W] 0888. Fair Candy Swap
[L] 0889. Construct Binary Tree from Preorder and Postorder Traversal
[W] 0890. Find and Replace Pattern
[B] 0891. Sum of Subsequence Widths
[G] 0892. Surface Area of 3D Shapes
[W] 0893. Groups of Special-Equivalent Strings
[W] 0894. All Possible Full Binary Trees
[L] 0895. Maximum Frequency Stack
[W] 0896. Monotonic Array
[L] 0897. Increasing Order Search Tree
[L] 0898. Bitwise ORs of Subarrays
[B] 0899. Orderly Queue
[W] 0900. RLE Iterator
[W] 0901. Online Stock Span
[G] 0902. Numbers At Most N Given Digit Set
[B] 0903. Valid Permutations for DI Sequence
[G] 0904. Fruit Into Baskets
[W] 0905. Sort Array By Parity
[G] 0906. Super Palindromes
[G] 0907. Sum of Subarray Minimums
[W] 0908. Smallest Range I
[G] 0909. Snakes and Ladders
[B] 0910. Smallest Range II
[W] 0911. Online Election
[W] 0912. Sort an Array
[B] 0913. Cat and Mouse
[L] 0914. X of a Kind in a Deck of Cards
[W] 0915. Partition Array into Disjoint Intervals
[W] 0916. Word Subsets
[W] 0917. Reverse Only Letters
[G] 0918. Maximum Sum Circular Subarray
[L] 0919. Complete Binary Tree Inserter
[B] 0920. Number of Music Playlists
[W] 0921. Minimum Add to Make Parentheses Valid
[B] 0922. Sort Array By Parity II
[L] 0923. 3Sum With Multiplicity
[W] 0924. Minimize Malware Spread
[G] 0925. Long Pressed Name
[B] 0926. Flip String to Monotone Increasing
[W] 0927. Three Equal Parts
[B] 0928. Minimize Malware Spread II
[W] 0929. Unique Email Addresses
[B] 0930. Binary Subarrays With Sum
[L] 0931. Minimum Falling Path Sum
[B] 0932. Beautiful Array
[W] 0933. Number of Recent Calls
[B] 0934. Shortest Bridge
[W] 0935. Knight Dialer
[B] 0936. Stamping The Sequence
[W] 0937. Reorder Log Files
[W] 0938. Range Sum of BST
[B] 0939. Minimum Area Rectangle
[B] 0940. Distinct Subsequences II
[L] 0941. Valid Mountain Array
[W] 0942. DI String Match
[B] 0943. Find the Shortest Superstring
[W] 0944. Delete Columns to Make Sorted
[L] 0945. Minimum Increment to Make Array Unique
[W] 0946. Validate Stack Sequences
[W] 0947. Most Stones Removed with Same Row or Column
[W] 0948. Bag of Tokens
[W] 0949. Largest Time for Given Digits
[W] 0950. Reveal Cards In Increasing Order
[W] 0951. Flip Equivalent Binary Trees
[G] 0952. Largest Component Size by Common Factor
[L] 0953. Verifying an Alien Dictionary
[G] 0954. Array of Doubled Pairs
[G] 0955. Delete Columns to Make Sorted II
[B] 0956. Tallest Billboard
[G] 0957. Prison Cells After N Days
[W] 0958. Check Completeness of a Binary Tree
[L] 0959. Regions Cut By Slashes
[L] 0960. Delete Columns to Make Sorted III
[W] 0961. N-Repeated Element in Size 2N Array
[B] 0962. Maximum Width Ramp
[B] 0963. Minimum Area Rectangle II
[B] 0964. Least Operators to Express Number
[W] 0965. Univalued Binary Tree
[W] 0966. Vowel Spellchecker
[L] 0967. Numbers With Same Consecutive Differences
[L] 0968. Binary Tree Cameras
[L] 0969. Pancake Sorting
[W] 0970. Powerful Integers
[W] 0971. Flip Binary Tree To Match Preorder Traversal
[G] 0972. Equal Rational Numbers
[W] 0973. K Closest Points to Origin
[B] 0974. Subarray Sums Divisible by K
[W] 0975. Odd Even Jump
[B] 0976. Largest Perimeter Triangle
[B] 0977. Squares of a Sorted Array
[W] 0978. Longest Turbulent Subarray
[W] 0979. Distribute Coins in Binary Tree
[W] 0980. Unique Paths III
[W] 0981. Time Based Key-Value Store
[B] 0982. Triples with Bitwise AND Equal To Zero
[L] 0983. Minimum Cost For Tickets
[W] 0984. String Without AAA or BBB
[W] 0985. Sum of Even Numbers After Queries
[W] 0986. Interval List Intersections
[W] 0987. Vertical Order Traversal of a Binary Tree
[G] 0988. Smallest String Starting From Leaf
[W] 0989. Add to Array-Form of Integer
[W] 0990. Satisfiability of Equality Equations
[B] 0991. Broken Calculator
[W] 0992. Subarrays with K Different Integers
[L] 0993. Cousins in Binary Tree
[W] 0994. Rotting Oranges
[B] 0995. Minimum Number of K Consecutive Bit Flips
[B] 0996. Number of Squareful Arrays
[G] 0997. Find the Town Judge
[W] 0998. Maximum Binary Tree II
[W] 0999. Available Captures for Rook
[B] 1000. Minimum Cost to Merge Stones
[G] 1001. Grid Illumination
[W] 1002. Find Common Characters
[W] 1003. Check If Word Is Valid After Substitutions
[G] 1004. Max Consecutive Ones III
[W] 1005. Maximize Sum Of Array After K Negations
[W] 1006. Clumsy Factorial
[G] 1007. Minimum Domino Rotations For Equal Row
[W] 1008. Construct Binary Search Tree from Preorder Traversal
[L] 1009. Complement of Base 10 Integer
[W] 1010. Pairs of Songs With Total Durations Divisible by 60
[W] 1011. Capacity To Ship Packages Within D Days
[W] 1012. Numbers With Repeated Digits
[W] 1013. Partition Array Into Three Parts With Equal Sum
[W] 1014. Best Sightseeing Pair
[W] 1015. Smallest Integer Divisible by K
[W] 1016. Binary String With Substrings Representing 1 To N
[L] 1017. Convert to Base -2
[W] 1018. Binary Prefix Divisible By 5
[W] 1019. Next Greater Node In Linked List
[W] 1020. Number of Enclaves
[W] 1021. Remove Outermost Parentheses
[W] 1022. Sum of Root To Leaf Binary Numbers
[W] 1023. Camelcase Matching
[W] 1024. Video Stitching
[W] 1025. Divisor Game
[W] 1026. Maximum Difference Between Node and Ancestor
[W] 1027. Longest Arithmetic Sequence
[L] 1028. Recover a Tree From Preorder Traversal
[W] 1029. Two City Scheduling
[L] 1030. Matrix Cells in Distance Order
[L] 1031. Maximum Sum of Two Non-Overlapping Subarrays
[L] 1032. Stream of Characters
[L] 1033. Moving Stones Until Consecutive
[L] 1034. Coloring A Border
[B] 1035. Uncrossed Lines
[B] 1036. Escape a Large Maze
[W] 1037. Valid Boomerang
[W] 1038. Binary Search Tree to Greater Sum Tree
[B] 1039. Minimum Score Triangulation of Polygon
[B] 1040. Moving Stones Until Consecutive II
[B] 1041. Robot Bounded In Circle
[L] 1042. Flower Planting With No Adjacent
[L] 1043. Partition Array for Maximum Sum
[B] 1044. Longest Duplicate Substring
[W] 1046. Last Stone Weight
[W] 1047. Remove All Adjacent Duplicates In String
[W] 1048. Longest String Chain
[B] 1049. Last Stone Weight II
[W] 1051. Height Checker
[W] 1052. Grumpy Bookstore Owner
[L] 1053. Previous Permutation With One Swap
[W] 1054. Distant Barcodes
[W] 1071. Greatest Common Divisor of Strings
[B] 1072. Flip Columns For Maximum Number of Equal Rows
[G] 1073. Adding Two Negabinary Numbers
[B] 1074. Number of Submatrices That Sum to Target
[W] 1078. Occurrences After Bigram
[B] 1079. Letter Tile Possibilities
[L] 1080. Insufficient Nodes in Root to Leaf Paths
[B] 1081. Smallest Subsequence of Distinct Characters
[B] 1089. Duplicate Zeros
[L] 1090. Largest Values From Labels
[L] 1091. Shortest Path in Binary Matrix
[L] 1092. Shortest Common Supersequence
[L] 1093. Statistics from a Large Sample
[W] 1094. Car Pooling
[L] 1095. Find in Mountain Array
[L] 1096. Brace Expansion II
[W] 1103. Distribute Candies to People
[G] 1104. Path In Zigzag Labelled Binary Tree
[W] 1105. Filling Bookcase Shelves
[W] 1106. Parsing A Boolean Expression
[W] 1108. Defanging an IP Address
[W] 1109. Corporate Flight Bookings
[L] 1110. Delete Nodes And Return Forest
[W] 1111. Maximum Nesting Depth of Two Valid Parentheses Strings
[W] 1114. Print in Order
[W] 1115. Print FooBar Alternately
[G] 1116. Print Zero Even Odd
[B] 1117. Building H2O
[W] 1122. Relative Sort Array
[B] 1123. Lowest Common Ancestor of Deepest Leaves
[B] 1124. Longest Well-Performing Interval
[B] 1125. Smallest Sufficient Team
[W] 1128. Number of Equivalent Domino Pairs
[W] 1129. Shortest Path with Alternating Colors
[G] 1130. Minimum Cost Tree From Leaf Values
[B] 1131. Maximum of Absolute Value Expression
[W] 1137. N-th Tribonacci Number
[W] 1138. Alphabet Board Path
[W] 1139. Largest 1-Bordered Square
[W] 1143. Longest Common Subsequence
[W] 1144. Decrease Elements To Make Array Zigzag
[W] 1145. Binary Tree Coloring Game
[W] 1146. Snapshot Array
[W] 1147. Longest Chunked Palindrome Decomposition
[W] 1154. Day of the Year
[W] 1155. Number of Dice Rolls With Target Sum
[L] 1156. Swap For Longest Repeated Character Substring
[B] 1157. Online Majority Element In Subarray
[W] 1160. Find Words That Can Be Formed by Characters
[W] 1161. Maximum Level Sum of a Binary Tree
[L] 1162. As Far from Land as Possible
[L] 1163. Last Substring in Lexicographical Order
[W] 1165. Single-Row Keyboard
[W] 1166. Design File System