Solutions
0001. Two Sum0002. Add Two Numbers0003. Longest Substring Without Repeating Characters0004. Median of Two Sorted Arrays0005. Longest Palindromic Substring0006. ZigZag Conversion0007. Reverse Integer0008. String to Integer (solutions/atoi)0009. Palindrome Number0010. Regular Expression Matching0011. Container With Most Water0012. Integer to Roman0013. Roman to Integer0014. Longest Common Prefix0015. 3Sum0016. 3Sum Closest0017. Letter Combinations of a Phone Number0018. 4Sum0019. Remove Nth Node From End of List0020. Valid Parentheses0021. Merge Two Sorted Lists0022. Generate Parentheses0023. Merge k Sorted Lists0024. Swap Nodes in Pairs0025. Reverse Nodes in k-Group0026. Remove Duplicates from Sorted Array0027. Remove Element0028. Implement strStr(solutions/)0029. Divide Two Integers0030. Substring with Concatenation of All Words0031. Next Permutation0032. Longest Valid Parentheses0033. Search in Rotated Sorted Array0034. Find First and Last Position of Element in Sorted Array0035. Search Insert Position0036. Valid Sudoku0037. Sudoku Solver0038. Count and Say0039. Combination Sum0040. Combination Sum II0041. First Missing Positive0042. Trapping Rain Water0043. Multiply Strings0044. Wildcard Matching0045. Jump Game II0046. Permutations0047. Permutations II0048. Rotate Image0049. Group Anagrams0050. Pow(solutions/x, n)0051. N-Queens0052. N-Queens II0053. Maximum Subarray0054. Spiral Matrix0055. Jump Game0056. Merge Intervals0057. Insert Interval0058. Length of Last Word0059. Spiral Matrix II0060. Permutation Sequence0061. Rotate List0062. Unique Paths0063. Unique Paths II0064. Minimum Path Sum0065. Valid Number0066. Plus One0067. Add Binary0068. Text Justification0069. Sqrt(solutions/x)0070. Climbing Stairs0071. Simplify Path0072. Edit Distance0073. Set Matrix Zeroes0074. Search a 2D Matrix0075. Sort Colors0076. Minimum Window Substring0077. Combinations0078. Subsets0079. Word Search0080. Remove Duplicates from Sorted Array II0081. Search in Rotated Sorted Array II0082. Remove Duplicates from Sorted List II0083. Remove Duplicates from Sorted List0084. Largest Rectangle in Histogram0085. Maximal Rectangle0086. Partition List0087. Scramble String0088. Merge Sorted Array0089. Gray Code0090. Subsets II0091. Decode Ways0092. Reverse Linked List II0093. Restore IP Addresses0094. Binary Tree Inorder Traversal0095. Unique Binary Search Trees II0096. Unique Binary Search Trees0097. Interleaving String0098. Validate Binary Search Tree0099. Recover Binary Search Tree0100. Same Tree0101. Symmetric Tree0102. Binary Tree Level Order Traversal0103. Binary Tree Zigzag Level Order Traversal0104. Maximum Depth of Binary Tree0105. Construct Binary Tree from Preorder and Inorder Traversal0106. Construct Binary Tree from Inorder and Postorder Traversal0107. Binary Tree Level Order Traversal II0108. Convert Sorted Array to Binary Search Tree0109. Convert Sorted List to Binary Search Tree0110. Balanced Binary Tree0111. Minimum Depth of Binary Tree0112. Path Sum0113. Path Sum II0114. Flatten Binary Tree to Linked List0115. Distinct Subsequences0116. Populating Next Right Pointers in Each Node0117. Populating Next Right Pointers in Each Node II0118. Pascal's Triangle0119. Pascal's Triangle II0120. Triangle0121. Best Time to Buy and Sell Stock0122. Best Time to Buy and Sell Stock II0123. Best Time to Buy and Sell Stock III0124. Binary Tree Maximum Path Sum0125. Valid Palindrome0126. Word Ladder II0127. Word Ladder0128. Longest Consecutive Sequence0129. Sum Root to Leaf Numbers0130. Surrounded Regions0131. Palindrome Partitioning0132. Palindrome Partitioning II0133. Clone Graph0134. Gas Station0135. Candy0136. Single Number0137. Single Number II0138. Copy List with Random Pointer0139. Word Break0140. Word Break II0141. Linked List Cycle0142. Linked List Cycle II0143. Reorder List0144. Binary Tree Preorder Traversal0145. Binary Tree Postorder Traversal0146. LRU Cache0147. Insertion Sort List0148. Sort List0149. Max Points on a Line0150. Evaluate Reverse Polish Notation0151. Reverse Words in a String0152. Maximum Product Subarray0153. Find Minimum in Rotated Sorted Array0154. Find Minimum in Rotated Sorted Array II0155. Min Stack0156. Binary Tree Upside Down0157. Read N Characters Given Read40158. Read N Characters Given Read4 II - Call multiple times0159. Longest Substring with At Most Two Distinct Characters0160. Intersection of Two Linked Lists0161. One Edit Distance0162. Find Peak Element0163. Missing Ranges0164. Maximum Gap0165. Compare Version Numbers0166. Fraction to Recurring Decimal0167. Two Sum II - Input array is sorted0168. Excel Sheet Column Title0169. Majority Element0170. Two Sum III - Data structure design0171. Excel Sheet Column Number0172. Factorial Trailing Zeroes0173. Binary Search Tree Iterator0174. Dungeon Game0175. Combine Two Tables0176. Second Highest Salary0177. Nth Highest Salary0178. Rank Scores0179. Largest Number0180. Consecutive Numbers0181. Employees Earning More Than Their Managers0182. Duplicate Emails0183. Customers Who Never Order0184. Department Highest Salary0185. Department Top Three Salaries0186. Reverse Words in a String II0187. Repeated DNA Sequences0188. Best Time to Buy and Sell Stock IV0189. Rotate Array0190. Reverse Bits0191. Number of 1 Bits0192. Word Frequency0193. Valid Phone Numbers0194. Transpose File0195. Tenth Line0196. Delete Duplicate Emails0197. Rising Temperature0198. House Robber0199. Binary Tree Right Side View0200. Number of Islands0201. Bitwise AND of Numbers Range0202. Happy Number0203. Remove Linked List Elements0204. Count Primes0205. Isomorphic Strings0206. Reverse Linked List0207. Course Schedule0208. Implement Trie (solutions/Prefix Tree)0209. Minimum Size Subarray Sum0210. Course Schedule II0211. Design Add and Search Words Data Structure0212. Word Search II0213. House Robber II0214. Shortest Palindrome0215. Kth Largest Element in an Array0216. Combination Sum III0217. Contains Duplicate0218. The Skyline Problem0219. Contains Duplicate II0220. Contains Duplicate III0221. Maximal Square0222. Count Complete Tree Nodes0223. Rectangle Area0224. Basic Calculator0225. Implement Stack using Queues0226. Invert Binary Tree0227. Basic Calculator II0228. Summary Ranges0229. Majority Element II0230. Kth Smallest Element in a BST0231. Power of Two0232. Implement Queue using Stacks0233. Number of Digit One0234. Palindrome Linked List0235. Lowest Common Ancestor of a Binary Search Tree0236. Lowest Common Ancestor of a Binary Tree0237. Delete Node in a Linked List0238. Product of Array Except Self0239. Sliding Window Maximum0240. Search a 2D Matrix II0241. Different Ways to Add Parentheses0242. Valid Anagram0243. Shortest Word Distance0244. Shortest Word Distance II0245. Shortest Word Distance III0246. Strobogrammatic Number0247. Strobogrammatic Number II0248. Strobogrammatic Number III0249. Group Shifted Strings0250. Count Univalue Subtrees0251. Flatten 2D Vector0252. Meeting Rooms0253. Meeting Rooms II0254. Factor Combinations0255. Verify Preorder Sequence in Binary Search Tree0256. Paint House0257. Binary Tree Paths0258. Add Digits0259. 3Sum Smaller0260. Single Number III0261. Graph Valid Tree0262. Trips and Users0263. Ugly Number0264. Ugly Number II0265. Paint House II0266. Palindrome Permutation0267. Palindrome Permutation II0268. Missing Number0269. Alien Dictionary0270. Closest Binary Search Tree Value0271. Encode and Decode Strings0272. Closest Binary Search Tree Value II0273. Integer to English Words0274. H-Index0275. H-Index II0276. Paint Fence0277. Find the Celebrity0278. First Bad Version0279. Perfect Squares0280. Wiggle Sort0281. Zigzag Iterator0282. Expression Add Operators0283. Move Zeroes0284. Peeking Iterator0285. Inorder Successor in BST0286. Walls and Gates0287. Find the Duplicate Number0288. Unique Word Abbreviation0289. Game of Life0290. Word Pattern0291. Word Pattern II0292. Nim Game0293. Flip Game0294. Flip Game II0295. Find Median from Data Stream0296. Best Meeting Point0297. Serialize and Deserialize Binary Tree0298. Binary Tree Longest Consecutive Sequence0299. Bulls and Cows0300. Longest Increasing Subsequence0301. Remove Invalid Parentheses0302. Smallest Rectangle Enclosing Black Pixels0303. Range Sum Query - Immutable0304. Range Sum Query 2D - Immutable0305. Number of Islands II0306. Additive Number0307. Range Sum Query - Mutable0308. Range Sum Query 2D - Mutable0309. Best Time to Buy and Sell Stock with Cooldown0310. Minimum Height Trees0311. Sparse Matrix Multiplication0312. Burst Balloons0313. Super Ugly Number0314. Binary Tree Vertical Order Traversal0315. Count of Smaller Numbers After Self0316. Remove Duplicate Letters0317. Shortest Distance from All Buildings0318. Maximum Product of Word Lengths0319. Bulb Switcher0320. Generalized Abbreviation0321. Create Maximum Number0322. Coin Change0323. Number of Connected Components in an Undirected Graph0324. Wiggle Sort II0325. Maximum Size Subarray Sum Equals k0326. Power of Three0327. Count of Range Sum0328. Odd Even Linked List0329. Longest Increasing Path in a Matrix0330. Patching Array0331. Verify Preorder Serialization of a Binary Tree0332. Reconstruct Itinerary0333. Largest BST Subtree0334. Increasing Triplet Subsequence0335. Self Crossing0336. Palindrome Pairs0337. House Robber III0338. Counting Bits0339. Nested List Weight Sum0340. Longest Substring with At Most K Distinct Characters0341. Flatten Nested List Iterator0342. Power of Four0343. Integer Break0344. Reverse String0345. Reverse Vowels of a String0346. Moving Average from Data Stream0347. Top K Frequent Elements0348. Design Tic-Tac-Toe0349. Intersection of Two Arrays0350. Intersection of Two Arrays II0351. Android Unlock Patterns0352. Data Stream as Disjoint Intervals0353. Design Snake Game0354. Russian Doll Envelopes0355. Design Twitter0356. Line Reflection0357. Count Numbers with Unique Digits0358. Rearrange String k Distance Apart0359. Logger Rate Limiter0360. Sort Transformed Array0361. Bomb Enemy0362. Design Hit Counter0363. Max Sum of Rectangle No Larger Than K0364. Nested List Weight Sum II0365. Water and Jug Problem0366. Find Leaves of Binary Tree0367. Valid Perfect Square0368. Largest Divisible Subset0369. Plus One Linked List0370. Range Addition0371. Sum of Two Integers0372. Super Pow0373. Find K Pairs with Smallest Sums0374. Guess Number Higher or Lower0375. Guess Number Higher or Lower II0376. Wiggle Subsequence0377. Combination Sum IV0378. Kth Smallest Element in a Sorted Matrix0379. Design Phone Directory0380. Insert Delete GetRandom O(solutions/1)0381. Insert Delete GetRandom O(solutions/1) - Duplicates allowed0382. Linked List Random Node0383. Ransom Note0384. Shuffle an Array0385. Mini Parser0386. Lexicographical Numbers0387. First Unique Character in a String0388. Longest Absolute File Path0389. Find the Difference0390. Elimination Game0391. Perfect Rectangle0392. Is Subsequence0393. UTF-8 Validation0394. Decode String0395. Longest Substring with At Least K Repeating Characters0396. Rotate Function0397. Integer Replacement0398. Random Pick Index0399. Evaluate Division0400. Nth Digit0401. Binary Watch0402. Remove K Digits0403. Frog Jump0404. Sum of Left Leaves0405. Convert a Number to Hexadecimal0406. Queue Reconstruction by Height0407. Trapping Rain Water II0408. Valid Word Abbreviation0409. Longest Palindrome0410. Split Array Largest Sum0411. Minimum Unique Word Abbreviation0412. Fizz Buzz0413. Arithmetic Slices0414. Third Maximum Number0415. Add Strings0416. Partition Equal Subset Sum0417. Pacific Atlantic Water Flow0418. Sentence Screen Fitting0419. Battleships in a Board0420. Strong Password Checker0421. Maximum XOR of Two Numbers in an Array0422. Valid Word Square0423. Reconstruct Original Digits from English0424. Longest Repeating Character Replacement0425. Word Squares0426. Convert Binary Search Tree to Sorted Doubly Linked List0427. Construct Quad Tree0428. Serialize and Deserialize N-ary Tree0429. N-ary Tree Level Order Traversal0430. Flatten a Multilevel Doubly Linked List0431. Encode N-ary Tree to Binary Tree0432. All O`one Data Structure0433. Minimum Genetic Mutation0434. Number of Segments in a String0435. Non-overlapping Intervals0436. Find Right Interval0437. Path Sum III0438. Find All Anagrams in a String0439. Ternary Expression Parser0440. K-th Smallest in Lexicographical Order0441. Arranging Coins0442. Find All Duplicates in an Array0443. String Compression0444. Sequence Reconstruction0445. Add Two Numbers II0446. Arithmetic Slices II - Subsequence0447. Number of Boomerangs0448. Find All Numbers Disappeared in an Array0449. Serialize and Deserialize BST0450. Delete Node in a BST0451. Sort Characters By Frequency0452. Minimum Number of Arrows to Burst Balloons0453. Minimum Moves to Equal Array Elements0454. 4Sum II0455. Assign Cookies0456. 132 Pattern0457. Circular Array Loop0458. Poor Pigs0459. Repeated Substring Pattern0460. LFU Cache0461. Hamming Distance0462. Minimum Moves to Equal Array Elements II0463. Island Perimeter0464. Can I Win0465. Optimal Account Balancing0466. Count The Repetitions0467. Unique Substrings in Wraparound String0468. Validate IP Address0469. Convex Polygon0470. Implement Rand10(solutions/) Using Rand7(solutions/)0471. Encode String with Shortest Length0472. Concatenated Words0473. Matchsticks to Square0474. Ones and Zeroes0475. Heaters0476. Number Complement0477. Total Hamming Distance0478. Generate Random Point in a Circle0479. Largest Palindrome Product0480. Sliding Window Median0481. Magical String0482. License Key Formatting0483. Smallest Good Base0484. Find Permutation0485. Max Consecutive Ones0486. Predict the Winner0487. Max Consecutive Ones II0488. Zuma Game0489. Robot Room Cleaner0490. The Maze0491. Increasing Subsequences0492. Construct the Rectangle0493. Reverse Pairs0494. Target Sum0495. Teemo Attacking0496. Next Greater Element I0497. Random Point in Non-overlapping Rectangles0498. Diagonal Traverse0499. The Maze III0500. Keyboard Row0501. Find Mode in Binary Search Tree0502. IPO0503. Next Greater Element II0504. Base 70505. The Maze II0506. Relative Ranks0507. Perfect Number0508. Most Frequent Subtree Sum0509. Fibonacci Number0510. Inorder Successor in BST II0511. Game Play Analysis I0512. Game Play Analysis II0513. Find Bottom Left Tree Value0514. Freedom Trail0515. Find Largest Value in Each Tree Row0516. Longest Palindromic Subsequence0517. Super Washing Machines0518. Coin Change 20519. Random Flip Matrix0520. Detect Capital0521. Longest Uncommon Subsequence I0522. Longest Uncommon Subsequence II0523. Continuous Subarray Sum0524. Longest Word in Dictionary through Deleting0525. Contiguous Array0526. Beautiful Arrangement0527. Word Abbreviation0528. Random Pick with Weight0529. Minesweeper0530. Minimum Absolute Difference in BST0531. Lonely Pixel I0532. K-diff Pairs in an Array0533. Lonely Pixel II0534. Game Play Analysis III0535. Encode and Decode TinyURL0536. Construct Binary Tree from String0537. Complex Number Multiplication0538. Convert BST to Greater Tree0539. Minimum Time Difference0540. Single Element in a Sorted Array0541. Reverse String II0542. 01 Matrix0543. Diameter of Binary Tree0544. Output Contest Matches0545. Boundary of Binary Tree0546. Remove Boxes0547. Number of Provinces0548. Split Array with Equal Sum0549. Binary Tree Longest Consecutive Sequence II0550. Game Play Analysis IV0551. Student Attendance Record I0552. Student Attendance Record II0553. Optimal Division0554. Brick Wall0555. Split Concatenated Strings0556. Next Greater Element III0557. Reverse Words in a String III0558. Logical OR of Two Binary Grids Represented as Quad-Trees0559. Maximum Depth of N-ary Tree0560. Subarray Sum Equals K0561. Array Partition I0562. Longest Line of Consecutive One in Matrix0563. Binary Tree Tilt0564. Find the Closest Palindrome0565. Array Nesting0566. Reshape the Matrix0567. Permutation in String0568. Maximum Vacation Days0569. Median Employee Salary0570. Managers with at Least 5 Direct Reports0571. Find Median Given Frequency of Numbers0572. Subtree of Another Tree0573. Squirrel Simulation0574. Winning Candidate0575. Distribute Candies0576. Out of Boundary Paths0577. Employee Bonus0578. Get Highest Answer Rate Question0579. Find Cumulative Salary of an Employee0580. Count Student Number in Departments0581. Shortest Unsorted Continuous Subarray0582. Kill Process0583. Delete Operation for Two Strings0584. Find Customer Referee0585. Investments in 20160586. Customer Placing the Largest Number of Orders0587. Erect the Fence0588. Design In-Memory File System0589. N-ary Tree Preorder Traversal0590. N-ary Tree Postorder Traversal0591. Tag Validator0592. Fraction Addition and Subtraction0593. Valid Square0594. Longest Harmonious Subsequence0595. Big Countries0596. Classes More Than 5 Students0597. Friend Requests I: Overall Acceptance Rate0598. Range Addition II0599. Minimum Index Sum of Two Lists0600. Non-negative Integers without Consecutive Ones0601. Human Traffic of Stadium0602. Friend Requests II: Who Has the Most Friends0603. Consecutive Available Seats0604. Design Compressed String Iterator0605. Can Place Flowers0606. Construct String from Binary Tree0607. Sales Person0608. Tree Node0609. Find Duplicate File in System0610. Triangle Judgement0611. Valid Triangle Number0612. Shortest Distance in a Plane0613. Shortest Distance in a Line0614. Second Degree Follower0615. Average Salary: Departments VS Company0616. Add Bold Tag in String0617. Merge Two Binary Trees0618. Students Report By Geography0619. Biggest Single Number0620. Not Boring Movies0621. Task Scheduler0622. Design Circular Queue0623. Add One Row to Tree0624. Maximum Distance in Arrays0625. Minimum Factorization0626. Exchange Seats0627. Swap Salary0628. Maximum Product of Three Numbers0629. K Inverse Pairs Array0630. Course Schedule III0631. Design Excel Sum Formula0632. Smallest Range Covering Elements from K Lists0633. Sum of Square Numbers0634. Find the Derangement of An Array0635. Design Log Storage System0636. Exclusive Time of Functions0637. Average of Levels in Binary Tree0638. Shopping Offers0639. Decode Ways II0640. Solve the Equation0641. Design Circular Deque0642. Design Search Autocomplete System0643. Maximum Average Subarray I0644. Maximum Average Subarray II0645. Set Mismatch0646. Maximum Length of Pair Chain0647. Palindromic Substrings0648. Replace Words0649. Dota2 Senate0650. 2 Keys Keyboard0651. 4 Keys Keyboard0652. Find Duplicate Subtrees0653. Two Sum IV - Input is a BST0654. Maximum Binary Tree0655. Print Binary Tree0656. Coin Path0657. Robot Return to Origin0658. Find K Closest Elements0659. Split Array into Consecutive Subsequences0660. Remove 90661. Image Smoother0662. Maximum Width of Binary Tree0663. Equal Tree Partition0664. Strange Printer0665. Non-decreasing Array0666. Path Sum IV0667. Beautiful Arrangement II0668. Kth Smallest Number in Multiplication Table0669. Trim a Binary Search Tree0670. Maximum Swap0671. Second Minimum Node In a Binary Tree0672. Bulb Switcher II0673. Number of Longest Increasing Subsequence0674. Longest Continuous Increasing Subsequence0675. Cut Off Trees for Golf Event0676. Implement Magic Dictionary0677. Map Sum Pairs0678. Valid Parenthesis String0679. 24 Game0680. Valid Palindrome II0681. Next Closest Time0682. Baseball Game0683. K Empty Slots0684. Redundant Connection0685. Redundant Connection II0686. Repeated String Match0687. Longest Univalue Path0688. Knight Probability in Chessboard0689. Maximum Sum of 3 Non-Overlapping Subarrays0690. Employee Importance0691. Stickers to Spell Word0692. Top K Frequent Words0693. Binary Number with Alternating Bits0694. Number of Distinct Islands0695. Max Area of Island0696. Count Binary Substrings0697. Degree of an Array0698. Partition to K Equal Sum Subsets0699. Falling Squares0700. Search in a Binary Search Tree0701. Insert into a Binary Search Tree0702. Search in a Sorted Array of Unknown Size0703. Kth Largest Element in a Stream0704. Binary Search0705. Design HashSet0706. Design HashMap0707. Design Linked List0708. Insert into a Sorted Circular Linked List0709. To Lower Case0710. Random Pick with Blacklist0711. Number of Distinct Islands II0712. Minimum ASCII Delete Sum for Two Strings0713. Subarray Product Less Than K0714. Best Time to Buy and Sell Stock with Transaction Fee0715. Range Module0716. Max Stack0717. 1-bit and 2-bit Characters0718. Maximum Length of Repeated Subarray0719. Find K-th Smallest Pair Distance0720. Longest Word in Dictionary0721. Accounts Merge0722. Remove Comments0723. Candy Crush0724. Find Pivot Index0725. Split Linked List in Parts0726. Number of Atoms0727. Minimum Window Subsequence0728. Self Dividing Numbers0729. My Calendar I0730. Count Different Palindromic Subsequences0731. My Calendar II0732. My Calendar III0733. Flood Fill0734. Sentence Similarity0735. Asteroid Collision0736. Parse Lisp Expression0737. Sentence Similarity II0738. Monotone Increasing Digits0739. Daily Temperatures0740. Delete and Earn0741. Cherry Pickup0742. Closest Leaf in a Binary Tree0743. Network Delay Time0744. Find Smallest Letter Greater Than Target0745. Prefix and Suffix Search0746. Min Cost Climbing Stairs0747. Largest Number At Least Twice of Others0748. Shortest Completing Word0749. Contain Virus0750. Number Of Corner Rectangles0751. IP to CIDR0752. Open the Lock0753. Cracking the Safe0754. Reach a Number0755. Pour Water0756. Pyramid Transition Matrix0757. Set Intersection Size At Least Two0758. Bold Words in String0759. Employee Free Time0760. Find Anagram Mappings0761. Special Binary String0762. Prime Number of Set Bits in Binary Representation0763. Partition Labels0764. Largest Plus Sign0765. Couples Holding Hands0766. Toeplitz Matrix0767. Reorganize String0768. Max Chunks To Make Sorted II0769. Max Chunks To Make Sorted0770. Basic Calculator IV0771. Jewels and Stones0772. Basic Calculator III0773. Sliding Puzzle0774. Minimize Max Distance to Gas Station0775. Global and Local Inversions0776. Split BST0777. Swap Adjacent in LR String0778. Swim in Rising Water0779. K-th Symbol in Grammar0780. Reaching Points0781. Rabbits in Forest0782. Transform to Chessboard0783. Minimum Distance Between BST Nodes0784. Letter Case Permutation0785. Is Graph Bipartite?0786. K-th Smallest Prime Fraction0787. Cheapest Flights Within K Stops0788. Rotated Digits0789. Escape The Ghosts0790. Domino and Tromino Tiling0791. Custom Sort String0792. Number of Matching Subsequences0793. Preimage Size of Factorial Zeroes Function0794. Valid Tic-Tac-Toe State0795. Number of Subarrays with Bounded Maximum0796. Rotate String0797. All Paths From Source to Target0798. Smallest Rotation with Highest Score0799. Champagne Tower0800. Similar RGB Color0801. Minimum Swaps To Make Sequences Increasing0802. Find Eventual Safe States0803. Bricks Falling When Hit0804. Unique Morse Code Words0805. Split Array With Same Average0806. Number of Lines To Write String0807. Max Increase to Keep City Skyline0808. Soup Servings0809. Expressive Words0810. Chalkboard XOR Game0811. Subdomain Visit Count0812. Largest Triangle Area0813. Largest Sum of Averages0814. Binary Tree Pruning0815. Bus Routes0816. Ambiguous Coordinates0817. Linked List Components0818. Race Car0819. Most Common Word0820. Short Encoding of Words0821. Shortest Distance to a Character0822. Card Flipping Game0823. Binary Trees With Factors0824. Goat Latin0825. Friends Of Appropriate Ages0826. Most Profit Assigning Work0827. Making A Large Island0828. Count Unique Characters of All Substrings of a Given String0829. Consecutive Numbers Sum0830. Positions of Large Groups0831. Masking Personal Information0832. Flipping an Image0833. Find And Replace in String0834. Sum of Distances in Tree0835. Image Overlap0836. Rectangle Overlap0837. New 21 Game0838. Push Dominoes0839. Similar String Groups0840. Magic Squares In Grid0841. Keys and Rooms0842. Split Array into Fibonacci Sequence0843. Guess the Word0844. Backspace String Compare0845. Longest Mountain in Array0846. Hand of Straights0847. Shortest Path Visiting All Nodes0848. Shifting Letters0849. Maximize Distance to Closest Person0850. Rectangle Area II0851. Loud and Rich0852. Peak Index in a Mountain Array0853. Car Fleet0854. K-Similar Strings0855. Exam Room0856. Score of Parentheses0857. Minimum Cost to Hire K Workers0858. Mirror Reflection0859. Buddy Strings0860. Lemonade Change0861. Score After Flipping Matrix0862. Shortest Subarray with Sum at Least K0863. All Nodes Distance K in Binary Tree0864. Shortest Path to Get All Keys0865. Smallest Subtree with all the Deepest Nodes0866. Prime Palindrome0867. Transpose Matrix0868. Binary Gap0869. Reordered Power of 20870. Advantage Shuffle0871. Minimum Number of Refueling Stops0872. Leaf-Similar Trees0873. Length of Longest Fibonacci Subsequence0874. Walking Robot Simulation0875. Koko Eating Bananas0876. Middle of the Linked List0877. Stone Game0878. Nth Magical Number0879. Profitable Schemes0880. Decoded String at Index0881. Boats to Save People0882. Reachable Nodes In Subdivided Graph0883. Projection Area of 3D Shapes0884. Uncommon Words from Two Sentences0885. Spiral Matrix III0886. Possible Bipartition0887. Super Egg Drop0888. Fair Candy Swap0889. Construct Binary Tree from Preorder and Postorder Traversal0890. Find and Replace Pattern0891. Sum of Subsequence Widths0892. Surface Area of 3D Shapes0893. Groups of Special-Equivalent Strings0894. All Possible Full Binary Trees0895. Maximum Frequency Stack0896. Monotonic Array0897. Increasing Order Search Tree0898. Bitwise ORs of Subarrays0899. Orderly Queue0900. RLE Iterator0901. Online Stock Span0902. Numbers At Most N Given Digit Set0903. Valid Permutations for DI Sequence0904. Fruit Into Baskets0905. Sort Array By Parity0906. Super Palindromes0907. Sum of Subarray Minimums0908. Smallest Range I0909. Snakes and Ladders0910. Smallest Range II0911. Online Election0912. Sort an Array0913. Cat and Mouse0914. X of a Kind in a Deck of Cards0915. Partition Array into Disjoint Intervals0916. Word Subsets0917. Reverse Only Letters0918. Maximum Sum Circular Subarray0919. Complete Binary Tree Inserter0920. Number of Music Playlists0921. Minimum Add to Make Parentheses Valid0922. Sort Array By Parity II0923. 3Sum With Multiplicity0924. Minimize Malware Spread0925. Long Pressed Name0926. Flip String to Monotone Increasing0927. Three Equal Parts0928. Minimize Malware Spread II0929. Unique Email Addresses0930. Binary Subarrays With Sum0931. Minimum Falling Path Sum0932. Beautiful Array0933. Number of Recent Calls0934. Shortest Bridge0935. Knight Dialer0936. Stamping The Sequence0937. Reorder Data in Log Files0938. Range Sum of BST0939. Minimum Area Rectangle0940. Distinct Subsequences II0941. Valid Mountain Array0942. DI String Match0943. Find the Shortest Superstring0944. Delete Columns to Make Sorted0945. Minimum Increment to Make Array Unique0946. Validate Stack Sequences0947. Most Stones Removed with Same Row or Column0948. Bag of Tokens0949. Largest Time for Given Digits0950. Reveal Cards In Increasing Order0951. Flip Equivalent Binary Trees0952. Largest Component Size by Common Factor0953. Verifying an Alien Dictionary0954. Array of Doubled Pairs0955. Delete Columns to Make Sorted II0956. Tallest Billboard0957. Prison Cells After N Days0958. Check Completeness of a Binary Tree0959. Regions Cut By Slashes0960. Delete Columns to Make Sorted III0961. N-Repeated Element in Size 2N Array0962. Maximum Width Ramp0963. Minimum Area Rectangle II0964. Least Operators to Express Number0965. Univalued Binary Tree0966. Vowel Spellchecker0967. Numbers With Same Consecutive Differences0968. Binary Tree Cameras0969. Pancake Sorting0970. Powerful Integers0971. Flip Binary Tree To Match Preorder Traversal0972. Equal Rational Numbers0973. K Closest Points to Origin0974. Subarray Sums Divisible by K0975. Odd Even Jump0976. Largest Perimeter Triangle0977. Squares of a Sorted Array0978. Longest Turbulent Subarray0979. Distribute Coins in Binary Tree0980. Unique Paths III0981. Time Based Key-Value Store0982. Triples with Bitwise AND Equal To Zero0983. Minimum Cost For Tickets0984. String Without AAA or BBB0985. Sum of Even Numbers After Queries0986. Interval List Intersections0987. Vertical Order Traversal of a Binary Tree0988. Smallest String Starting From Leaf0989. Add to Array-Form of Integer0990. Satisfiability of Equality Equations0991. Broken Calculator0992. Subarrays with K Different Integers0993. Cousins in Binary Tree0994. Rotting Oranges0995. Minimum Number of K Consecutive Bit Flips0996. Number of Squareful Arrays0997. Find the Town Judge0998. Maximum Binary Tree II0999. Available Captures for Rook1000. Minimum Cost to Merge Stones1001. Grid Illumination1002. Find Common Characters1003. Check If Word Is Valid After Substitutions1004. Max Consecutive Ones III1005. Maximize Sum Of Array After K Negations1006. Clumsy Factorial1007. Minimum Domino Rotations For Equal Row1008. Construct Binary Search Tree from Preorder Traversal1009. Complement of Base 10 Integer1010. Pairs of Songs With Total Durations Divisible by 601011. Capacity To Ship Packages Within D Days1012. Numbers With Repeated Digits1013. Partition Array Into Three Parts With Equal Sum1014. Best Sightseeing Pair1015. Smallest Integer Divisible by K1016. Binary String With Substrings Representing 1 To N1017. Convert to Base -21018. Binary Prefix Divisible By 51019. Next Greater Node In Linked List1020. Number of Enclaves1021. Remove Outermost Parentheses1022. Sum of Root To Leaf Binary Numbers1023. Camelcase Matching1024. Video Stitching1025. Divisor Game1026. Maximum Difference Between Node and Ancestor1027. Longest Arithmetic Subsequence1028. Recover a Tree From Preorder Traversal1029. Two City Scheduling1030. Matrix Cells in Distance Order1031. Maximum Sum of Two Non-Overlapping Subarrays1032. Stream of Characters1033. Moving Stones Until Consecutive1034. Coloring A Border1035. Uncrossed Lines1036. Escape a Large Maze1037. Valid Boomerang1038. Binary Search Tree to Greater Sum Tree1039. Minimum Score Triangulation of Polygon1040. Moving Stones Until Consecutive II1041. Robot Bounded In Circle1042. Flower Planting With No Adjacent1043. Partition Array for Maximum Sum1044. Longest Duplicate Substring1045. Customers Who Bought All Products1046. Last Stone Weight1047. Remove All Adjacent Duplicates In String1048. Longest String Chain1049. Last Stone Weight II1050. Actors and Directors Who Cooperated At Least Three Times1051. Height Checker1052. Grumpy Bookstore Owner1053. Previous Permutation With One Swap1054. Distant Barcodes1055. Shortest Way to Form String1056. Confusing Number1057. Campus Bikes1058. Minimize Rounding Error to Meet Target1059. All Paths from Source Lead to Destination1060. Missing Element in Sorted Array1061. Lexicographically Smallest Equivalent String1062. Longest Repeating Substring1063. Number of Valid Subarrays1064. Fixed Point1065. Index Pairs of a String1066. Campus Bikes II1067. Digit Count in Range1068. Product Sales Analysis I1069. Product Sales Analysis II1070. Product Sales Analysis III1071. Greatest Common Divisor of Strings1072. Flip Columns For Maximum Number of Equal Rows1073. Adding Two Negabinary Numbers1074. Number of Submatrices That Sum to Target1075. Project Employees I1076. Project Employees II1077. Project Employees III1078. Occurrences After Bigram1079. Letter Tile Possibilities1080. Insufficient Nodes in Root to Leaf Paths1081. Smallest Subsequence of Distinct Characters1082. Sales Analysis I1083. Sales Analysis II1084. Sales Analysis III1085. Sum of Digits in the Minimum Number1086. High Five1087. Brace Expansion1088. Confusing Number II1089. Duplicate Zeros1090. Largest Values From Labels1091. Shortest Path in Binary Matrix1092. Shortest Common Supersequence1093. Statistics from a Large Sample1094. Car Pooling1095. Find in Mountain Array1096. Brace Expansion II1097. Game Play Analysis V1098. Unpopular Books1099. Two Sum Less Than K1100. Find K-Length Substrings With No Repeated Characters1101. The Earliest Moment When Everyone Become Friends1102. Path With Maximum Minimum Value1103. Distribute Candies to People1104. Path In Zigzag Labelled Binary Tree1105. Filling Bookcase Shelves1106. Parsing A Boolean Expression1107. New Users Daily Count1108. Defanging an IP Address1109. Corporate Flight Bookings1110. Delete Nodes And Return Forest1111. Maximum Nesting Depth of Two Valid Parentheses Strings1112. Highest Grade For Each Student1113. Reported Posts1114. Print in Order1115. Print FooBar Alternately1116. Print Zero Even Odd1117. Building H2O1118. Number of Days in a Month1119. Remove Vowels from a String1120. Maximum Average Subtree1121. Divide Array Into Increasing Sequences1122. Relative Sort Array1123. Lowest Common Ancestor of Deepest Leaves1124. Longest Well-Performing Interval1125. Smallest Sufficient Team1126. Active Businesses1127. User Purchase Platform1128. Number of Equivalent Domino Pairs1129. Shortest Path with Alternating Colors1130. Minimum Cost Tree From Leaf Values1131. Maximum of Absolute Value Expression1132. Reported Posts II1133. Largest Unique Number1134. Armstrong Number1135. Connecting Cities With Minimum Cost1136. Parallel Courses1137. N-th Tribonacci Number1138. Alphabet Board Path1139. Largest 1-Bordered Square1140. Stone Game II1141. User Activity for the Past 30 Days I1142. User Activity for the Past 30 Days II1143. Longest Common Subsequence1144. Decrease Elements To Make Array Zigzag1145. Binary Tree Coloring Game1146. Snapshot Array1147. Longest Chunked Palindrome Decomposition1148. Article Views I1149. Article Views II1150. Check If a Number Is Majority Element in a Sorted Array1151. Minimum Swaps to Group All 1's Together1152. Analyze User Website Visit Pattern1153. String Transforms Into Another String1154. Day of the Year1155. Number of Dice Rolls With Target Sum1156. Swap For Longest Repeated Character Substring1157. Online Majority Element In Subarray1158. Market Analysis I1159. Market Analysis II1160. Find Words That Can Be Formed by Characters1161. Maximum Level Sum of a Binary Tree1162. As Far from Land as Possible1163. Last Substring in Lexicographical Order1164. Product Price at a Given Date1165. Single-Row Keyboard1166. Design File System1167. Minimum Cost to Connect Sticks1168. Optimize Water Distribution in a Village1169. Invalid Transactions1170. Compare Strings by Frequency of the Smallest Character1171. Remove Zero Sum Consecutive Nodes from Linked List1172. Dinner Plate Stacks1173. Immediate Food Delivery I1174. Immediate Food Delivery II1175. Prime Arrangements1176. Diet Plan Performance1177. Can Make Palindrome from Substring1178. Number of Valid Words for Each Puzzle1179. Reformat Department Table1180. Count Substrings with Only One Distinct Letter1181. Before and After Puzzle1182. Shortest Distance to Target Color1183. Maximum Number of Ones1184. Distance Between Bus Stops1185. Day of the Week1186. Maximum Subarray Sum with One Deletion1187. Make Array Strictly Increasing1188. Design Bounded Blocking Queue1189. Maximum Number of Balloons1190. Reverse Substrings Between Each Pair of Parentheses1191. K-Concatenation Maximum Sum1192. Critical Connections in a Network1193. Monthly Transactions I1194. Tournament Winners1195. Fizz Buzz Multithreaded1196. How Many Apples Can You Put into the Basket1197. Minimum Knight Moves1198. Find Smallest Common Element in All Rows1199. Minimum Time to Build Blocks1200. Minimum Absolute Difference1201. Ugly Number III1202. Smallest String With Swaps1203. Sort Items by Groups Respecting Dependencies1204. Last Person to Fit in the Bus1205. Monthly Transactions II1206. Design Skiplist1207. Unique Number of Occurrences1208. Get Equal Substrings Within Budget1209. Remove All Adjacent Duplicates in String II1210. Minimum Moves to Reach Target with Rotations1211. Queries Quality and Percentage1212. Team Scores in Football Tournament1213. Intersection of Three Sorted Arrays1214. Two Sum BSTs1215. Stepping Numbers1216. Valid Palindrome III1217. Minimum Cost to Move Chips to The Same Position1218. Longest Arithmetic Subsequence of Given Difference1219. Path with Maximum Gold1220. Count Vowels Permutation1221. Split a String in Balanced Strings1222. Queens That Can Attack the King1223. Dice Roll Simulation1224. Maximum Equal Frequency1225. Report Contiguous Dates1226. The Dining Philosophers1227. Airplane Seat Assignment Probability1228. Missing Number In Arithmetic Progression1229. Meeting Scheduler1230. Toss Strange Coins1231. Divide Chocolate1232. Check If It Is a Straight Line1233. Remove Sub-Folders from the Filesystem1234. Replace the Substring for Balanced String1235. Maximum Profit in Job Scheduling1236. Web Crawler1237. Find Positive Integer Solution for a Given Equation1238. Circular Permutation in Binary Representation1239. Maximum Length of a Concatenated String with Unique Characters1240. Tiling a Rectangle with the Fewest Squares1241. Number of Comments per Post1242. Web Crawler Multithreaded1243. Array Transformation1244. Design A Leaderboard1245. Tree Diameter1246. Palindrome Removal1247. Minimum Swaps to Make Strings Equal1248. Count Number of Nice Subarrays1249. Minimum Remove to Make Valid Parentheses1250. Check If It Is a Good Array1251. Average Selling Price1252. Cells with Odd Values in a Matrix1253. Reconstruct a 2-Row Binary Matrix1254. Number of Closed Islands1255. Maximum Score Words Formed by Letters1256. Encode Number1257. Smallest Common Region1258. Synonymous Sentences1259. Handshakes That Don't Cross1260. Shift 2D Grid1261. Find Elements in a Contaminated Binary Tree1262. Greatest Sum Divisible by Three1263. Minimum Moves to Move a Box to Their Target Location1264. Page Recommendations1265. Print Immutable Linked List in Reverse1266. Minimum Time Visiting All Points1267. Count Servers that Communicate1268. Search Suggestions System1269. Number of Ways to Stay in the Same Place After Some Steps1270. All People Report to the Given Manager1271. Hexspeak1272. Remove Interval1273. Delete Tree Nodes1274. Number of Ships in a Rectangle1275. Find Winner on a Tic Tac Toe Game1276. Number of Burgers with No Waste of Ingredients1277. Count Square Submatrices with All Ones1278. Palindrome Partitioning III1279. Traffic Light Controlled Intersection1280. Students and Examinations1281. Subtract the Product and Sum of Digits of an Integer1282. Group the People Given the Group Size They Belong To1283. Find the Smallest Divisor Given a Threshold1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix1285. Find the Start and End Number of Continuous Ranges1286. Iterator for Combination1287. Element Appearing More Than 25% In Sorted Array1288. Remove Covered Intervals1289. Minimum Falling Path Sum II1290. Convert Binary Number in a Linked List to Integer1291. Sequential Digits1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold1293. Shortest Path in a Grid with Obstacles Elimination1294. Weather Type in Each Country1295. Find Numbers with Even Number of Digits1296. Divide Array in Sets of K Consecutive Numbers1297. Maximum Number of Occurrences of a Substring1298. Maximum Candies You Can Get from Boxes1299. Replace Elements with Greatest Element on Right Side1300. Sum of Mutated Array Closest to Target1301. Number of Paths with Max Score1302. Deepest Leaves Sum1303. Find the Team Size1304. Find N Unique Integers Sum up to Zero1305. All Elements in Two Binary Search Trees1306. Jump Game III1307. Verbal Arithmetic Puzzle1308. Running Total for Different Genders1309. Decrypt String from Alphabet to Integer Mapping1310. XOR Queries of a Subarray1311. Get Watched Videos by Your Friends1312. Minimum Insertion Steps to Make a String Palindrome1313. Decompress Run-Length Encoded List1314. Matrix Block Sum1315. Sum of Nodes with Even-Valued Grandparent1316. Distinct Echo Substrings1317. Convert Integer to the Sum of Two No-Zero Integers1318. Minimum Flips to Make a OR b Equal to c1319. Number of Operations to Make Network Connected1320. Minimum Distance to Type a Word Using Two Fingers1321. Restaurant Growth1322. Ads Performance1323. Maximum 69 Number1324. Print Words Vertically1325. Delete Leaves With a Given Value1326. Minimum Number of Taps to Open to Water a Garden1327. List the Products Ordered in a Period1328. Break a Palindrome1329. Sort the Matrix Diagonally1330. Reverse Subarray To Maximize Array Value1331. Rank Transform of an Array1332. Remove Palindromic Subsequences1333. Filter Restaurants by Vegan-Friendly, Price and Distance1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance1335. Minimum Difficulty of a Job Schedule1336. Number of Transactions per Visit1337. The K Weakest Rows in a Matrix1338. Reduce Array Size to The Half1339. Maximum Product of Splitted Binary Tree1340. Jump Game V1341. Movie Rating1342. Number of Steps to Reduce a Number to Zero1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold1344. Angle Between Hands of a Clock1345. Jump Game IV1346. Check If N and Its Double Exist1347. Minimum Number of Steps to Make Two Strings Anagram1348. Tweet Counts Per Frequency1349. Maximum Students Taking Exam1350. Students With Invalid Departments1351. Count Negative Numbers in a Sorted Matrix1352. Product of the Last K Numbers1353. Maximum Number of Events That Can Be Attended1354. Construct Target Array With Multiple Sums1355. Activity Participants1356. Sort Integers by The Number of 1 Bits1357. Apply Discount Every n Orders1358. Number of Substrings Containing All Three Characters1359. Count All Valid Pickup and Delivery Options1360. Number of Days Between Two Dates1361. Validate Binary Tree Nodes1362. Closest Divisors1363. Largest Multiple of Three1364. Number of Trusted Contacts of a Customer1365. How Many Numbers Are Smaller Than the Current Number1366. Rank Teams by Votes1367. Linked List in Binary Tree1368. Minimum Cost to Make at Least One Valid Path in a Grid1369. Get the Second Most Recent Activity1370. Increasing Decreasing String1371. Find the Longest Substring Containing Vowels in Even Counts1372. Longest ZigZag Path in a Binary Tree1373. Maximum Sum BST in Binary Tree1374. Generate a String With Characters That Have Odd Counts1375. Bulb Switcher III1376. Time Needed to Inform All Employees1377. Frog Position After T Seconds1378. Replace Employee ID With The Unique Identifier1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree1380. Lucky Numbers in a Matrix1381. Design a Stack With Increment Operation1382. Balance a Binary Search Tree1383. Maximum Performance of a Team1384. Total Sales Amount by Year1385. Find the Distance Value Between Two Arrays1386. Cinema Seat Allocation1387. Sort Integers by The Power Value1388. Pizza With 3n Slices1389. Create Target Array in the Given Order1390. Four Divisors1391. Check if There is a Valid Path in a Grid1392. Longest Happy Prefix1393. Capital Gain/Loss1394. Find Lucky Integer in an Array1395. Count Number of Teams1396. Design Underground System1397. Find All Good Strings1398. Customers Who Bought Products A and B but Not C1399. Count Largest Group1400. Construct K Palindrome Strings1401. Circle and Rectangle Overlapping1402. Reducing Dishes1403. Minimum Subsequence in Non-Increasing Order1404. Number of Steps to Reduce a Number in Binary Representation to One1405. Longest Happy String1406. Stone Game III1407. Top Travellers1408. String Matching in an Array1409. Queries on a Permutation With Key1410. HTML Entity Parser1411. Number of Ways to Paint N × 3 Grid1412. Find the Quiet Students in All Exams1413. Minimum Value to Get Positive Step by Step Sum1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K1415. The k-th Lexicographical String of All Happy Strings of Length n1416. Restore The Array1417. Reformat The String1418. Display Table of Food Orders in a Restaurant1419. Minimum Number of Frogs Croaking1420. Build Array Where You Can Find The Maximum Exactly K Comparisons1421. NPV Queries1422. Maximum Score After Splitting a String1423. Maximum Points You Can Obtain from Cards1424. Diagonal Traverse II1425. Constrained Subsequence Sum1426. Counting Elements1427. Perform String Shifts1428. Leftmost Column with at Least a One1429. First Unique Number1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree1431. Kids With the Greatest Number of Candies1432. Max Difference You Can Get From Changing an Integer1433. Check If a String Can Break Another String1434. Number of Ways to Wear Different Hats to Each Other1435. Create a Session Bar Chart1436. Destination City1437. Check If All 1's Are at Least Length K Places Away1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows1440. Evaluate Boolean Expression1441. Build an Array With Stack Operations1442. Count Triplets That Can Form Two Arrays of Equal XOR1443. Minimum Time to Collect All Apples in a Tree1444. Number of Ways of Cutting a Pizza1445. Apples & Oranges1446. Consecutive Characters1447. Simplified Fractions1448. Count Good Nodes in Binary Tree1449. Form Largest Integer With Digits That Add up to Target1450. Number of Students Doing Homework at a Given Time1451. Rearrange Words in a Sentence1452. People Whose List of Favorite Companies Is Not a Subset of Another List1453. Maximum Number of Darts Inside of a Circular Dartboard1454. Active Users1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence1456. Maximum Number of Vowels in a Substring of Given Length1457. Pseudo-Palindromic Paths in a Binary Tree1458. Max Dot Product of Two Subsequences1459. Rectangles Area1460. Make Two Arrays Equal by Reversing Sub-arrays1461. Check If a String Contains All Binary Codes of Size K1462. Course Schedule IV1463. Cherry Pickup II1464. Maximum Product of Two Elements in an Array1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts1466. Reorder Routes to Make All Paths Lead to the City Zero1467. Probability of a Two Boxes Having The Same Number of Distinct Balls1468. Calculate Salaries1469. Find All The Lonely Nodes1470. Shuffle the Array1471. The k Strongest Values in an Array1472. Design Browser History1473. Paint House III1474. Delete N Nodes After M Nodes of a Linked List1475. Final Prices With a Special Discount in a Shop1476. Subrectangle Queries1477. Find Two Non-overlapping Sub-arrays Each With Target Sum1478. Allocate Mailboxes1479. Sales by Day of the Week1480. Running Sum of 1d Array1481. Least Number of Unique Integers after K Removals1482. Minimum Number of Days to Make m Bouquets1483. Kth Ancestor of a Tree Node1484. Group Sold Products By The Date1485. Clone Binary Tree With Random Pointer1486. XOR Operation in an Array1487. Making File Names Unique1488. Avoid Flood in The City1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree1490. Clone N-ary Tree1491. Average Salary Excluding the Minimum and Maximum Salary1492. The kth Factor of n1493. Longest Subarray of 1's After Deleting One Element1494. Parallel Courses II1495. Friendly Movies Streamed Last Month1496. Path Crossing1497. Check If Array Pairs Are Divisible by k1498. Number of Subsequences That Satisfy the Given Sum Condition1499. Max Value of Equation1500. Design a File Sharing System1501. Countries You Can Safely Invest In1502. Can Make Arithmetic Progression From Sequence1503. Last Moment Before All Ants Fall Out of a Plank1504. Count Submatrices With All Ones1505. Minimum Possible Integer After at Most K Adjacent Swaps On Digits1506. Find Root of N-Ary Tree1507. Reformat Date1508. Range Sum of Sorted Subarray Sums1509. Minimum Difference Between Largest and Smallest Value in Three Moves1510. Stone Game IV1511. Customer Order Frequency1512. Number of Good Pairs1513. Number of Substrings With Only 1s1514. Path with Maximum Probability1515. Best Position for a Service Centre1516. Move Sub-Tree of N-Ary Tree1517. Find Users With Valid E-Mails1518. Water Bottles1519. Number of Nodes in the Sub-Tree With the Same Label1520. Maximum Number of Non-Overlapping Substrings1521. Find a Value of a Mysterious Function Closest to Target1522. Diameter of N-Ary Tree1523. Count Odd Numbers in an Interval Range1524. Number of Sub-arrays With Odd Sum1525. Number of Good Ways to Split a String1526. Minimum Number of Increments on Subarrays to Form a Target Array1527. Patients With a Condition1528. Shuffle String1529. Bulb Switcher IV1530. Number of Good Leaf Nodes Pairs1531. String Compression II1532. The Most Recent Three Orders1533. Find the Index of the Large Integer1534. Count Good Triplets1535. Find the Winner of an Array Game1536. Minimum Swaps to Arrange a Binary Grid1537. Get the Maximum Score1538. Guess the Majority in a Hidden Array1539. Kth Missing Positive Number1540. Can Convert String in K Moves1541. Minimum Insertions to Balance a Parentheses String1542. Find Longest Awesome Substring1543. Fix Product Name Format1544. Make The String Great1545. Find Kth Bit in Nth Binary String1546. Maximum Number of Non-Overlapping Subarrays With Sum Equals Target1547. Minimum Cost to Cut a Stick1548. The Most Similar Path in a Graph1549. The Most Recent Orders for Each Product1550. Three Consecutive Odds1551. Minimum Operations to Make Array Equal1552. Magnetic Force Between Two Balls1553. Minimum Number of Days to Eat N Oranges1554. Strings Differ by One Character1555. Bank Account Summary1556. Thousand Separator1557. Minimum Number of Vertices to Reach All Nodes1558. Minimum Numbers of Function Calls to Make Target Array1559. Detect Cycles in 2D Grid1560. Most Visited Sector in a Circular Track1561. Maximum Number of Coins You Can Get1562. Find Latest Group of Size M1563. Stone Game V1564. Put Boxes Into the Warehouse I1565. Unique Orders and Customers Per Month1566. Detect Pattern of Length M Repeated K or More Times1567. Maximum Length of Subarray With Positive Product1568. Minimum Number of Days to Disconnect Island1569. Number of Ways to Reorder Array to Get Same BST1570. Dot Product of Two Sparse Vectors1571. Warehouse Manager1572. Matrix Diagonal Sum1573. Number of Ways to Split a String1574. Shortest Subarray to be Removed to Make Array Sorted1575. Count All Possible Routes1576. Replace All ?'s to Avoid Consecutive Repeating Characters1577. Number of Ways Where Square of Number Is Equal to Product of Two Numbers1578. Minimum Deletion Cost to Avoid Repeating Letters1579. Remove Max Number of Edges to Keep Graph Fully Traversable1580. Put Boxes Into the Warehouse II1581. Customer Who Visited but Did Not Make Any Transactions1582. Special Positions in a Binary Matrix1583. Count Unhappy Friends1584. Min Cost to Connect All Points1585. Check If String Is Transformable With Substring Sort Operations1586. Binary Search Tree Iterator II1587. Bank Account Summary II1588. Sum of All Odd Length Subarrays1589. Maximum Sum Obtained of Any Permutation1590. Make Sum Divisible by P1591. Strange Printer II1592. Rearrange Spaces Between Words1593. Split a String Into the Max Number of Unique Substrings1594. Maximum Non Negative Product in a Matrix1595. Minimum Cost to Connect Two Groups of Points1596. The Most Frequently Ordered Products for Each Customer1597. Build Binary Expression Tree From Infix Expression1598. Crawler Log Folder1599. Maximum Profit of Operating a Centennial Wheel1600. Throne Inheritance1601. Maximum Number of Achievable Transfer Requests1602. Find Nearest Right Node in Binary Tree1603. Design Parking System1604. Alert Using Same Key-Card Three or More Times in a One Hour Period1605. Find Valid Matrix Given Row and Column Sums1606. Find Servers That Handled Most Number of Requests1607. Sellers With No Sales1608. Special Array With X Elements Greater Than or Equal X1609. Even Odd Tree1610. Maximum Number of Visible Points1611. Minimum One Bit Operations to Make Integers Zero1612. Check If Two Expression Trees are Equivalent1613. Find the Missing IDs1614. Maximum Nesting Depth of the Parentheses1615. Maximal Network Rank1616. Split Two Strings to Make Palindrome1617. Count Subtrees With Max Distance Between Cities1618. Maximum Font to Fit a Sentence in a Screen1619. Mean of Array After Removing Some Elements1620. Coordinate With Maximum Network Quality1621. Number of Sets of K Non-Overlapping Line Segments1622. Fancy Sequence1623. All Valid Triplets That Can Represent a Country1624. Largest Substring Between Two Equal Characters1625. Lexicographically Smallest String After Applying Operations1626. Best Team With No Conflicts1627. Graph Connectivity With Threshold1628. Design an Expression Tree With Evaluate Function1629. Slowest Key1630. Arithmetic Subarrays1631. Path With Minimum Effort1632. Rank Transform of a Matrix1633. Percentage of Users Attended a Contest1634. Add Two Polynomials Represented as Linked Lists1635. Hopper Company Queries I1636. Sort Array by Increasing Frequency1637. Widest Vertical Area Between Two Points Containing No Points1638. Count Substrings That Differ by One Character1639. Number of Ways to Form a Target String Given a Dictionary1640. Check Array Formation Through Concatenation1641. Count Sorted Vowel Strings1642. Furthest Building You Can Reach1643. Kth Smallest Instructions1644. Lowest Common Ancestor of a Binary Tree II1645. Hopper Company Queries II1646. Get Maximum in Generated Array1647. Minimum Deletions to Make Character Frequencies Unique1648. Sell Diminishing-Valued Colored Balls1649. Create Sorted Array through Instructions1650. Lowest Common Ancestor of a Binary Tree III1651. Hopper Company Queries III1652. Defuse the Bomb1653. Minimum Deletions to Make String Balanced1654. Minimum Jumps to Reach Home1655. Distribute Repeating Integers1656. Design an Ordered Stream1657. Determine if Two Strings Are Close1658. Minimum Operations to Reduce X to Zero1659. Maximize Grid Happiness1660. Correct a Binary Tree1661. Average Time of Process per Machine1662. Check If Two String Arrays are Equivalent1663. Smallest String With A Given Numeric Value1664. Ways to Make a Fair Array1665. Minimum Initial Energy to Finish Tasks1666. Change the Root of a Binary Tree1667. Fix Names in a Table1668. Maximum Repeating Substring1669. Merge In Between Linked Lists1670. Design Front Middle Back Queue1671. Minimum Number of Removals to Make Mountain Array1672. Richest Customer Wealth1673. Find the Most Competitive Subsequence1674. Minimum Moves to Make Array Complementary1675. Minimize Deviation in Array1676. Lowest Common Ancestor of a Binary Tree IV1677. Product's Worth Over Invoices1678. Goal Parser Interpretation1679. Max Number of K-Sum Pairs1680. Concatenation of Consecutive Binary Numbers1681. Minimum Incompatibility1682. Longest Palindromic Subsequence II1683. Invalid Tweets1684. Count the Number of Consistent Strings1685. Sum of Absolute Differences in a Sorted Array1686. Stone Game VI1687. Delivering Boxes from Storage to Ports1688. Count of Matches in Tournament1689. Partitioning Into Minimum Number Of Deci-Binary Numbers1690. Stone Game VII1691. Maximum Height by Stacking Cuboids1692. Count Ways to Distribute Candies1693. Daily Leads and Partners1694. Reformat Phone Number1695. Maximum Erasure Value1696. Jump Game VI1697. Checking Existence of Edge Length Limited Paths1698. Number of Distinct Substrings in a String1699. Number of Calls Between Two Persons1700. Number of Students Unable to Eat Lunch1701. Average Waiting Time1702. Maximum Binary String After Change1703. Minimum Adjacent Swaps for K Consecutive Ones1704. Determine if String Halves Are Alike1705. Maximum Number of Eaten Apples1706. Where Will the Ball Fall1707. Maximum XOR With an Element From Array1708. Largest Subarray Length K1709. Biggest Window Between Visits1710. Maximum Units on a Truck1711. Count Good Meals1712. Ways to Split Array Into Three Subarrays1713. Minimum Operations to Make a Subsequence1714. Sum Of Special Evenly-Spaced Elements In Array1715. Count Apples and Oranges1716. Calculate Money in Leetcode Bank1717. Maximum Score From Removing Substrings1718. Construct the Lexicographically Largest Valid Sequence1719. Number Of Ways To Reconstruct A Tree1720. Decode XORed Array1721. Swapping Nodes in a Linked List1722. Minimize Hamming Distance After Swap Operations1723. Find Minimum Time to Finish All Jobs1724. Checking Existence of Edge Length Limited Paths II1725. Number Of Rectangles That Can Form The Largest Square1726. Tuple with Same Product1727. Largest Submatrix With Rearrangements1728. Cat and Mouse II1729. Find Followers Count1730. Shortest Path to Get Food1731. The Number of Employees Which Report to Each Employee1732. Find the Highest Altitude1733. Minimum Number of People to Teach1734. Decode XORed Permutation1735. Count Ways to Make Array With Product1736. Latest Time by Replacing Hidden Digits1737. Change Minimum Characters to Satisfy One of Three Conditions1738. Find Kth Largest XOR Coordinate Value1739. Building Boxes1740. Find Distance in a Binary Tree1741. Find Total Time Spent by Each Employee1742. Maximum Number of Balls in a Box1743. Restore the Array From Adjacent Pairs1744. Can You Eat Your Favorite Candy on Your Favorite Day?1745. Palindrome Partitioning IV1746. Maximum Subarray Sum After One Operation1747. Leetflex Banned Accounts1748. Sum of Unique Elements1749. Maximum Absolute Sum of Any Subarray1750. Minimum Length of String After Deleting Similar Ends1751. Maximum Number of Events That Can Be Attended II1752. Check if Array Is Sorted and Rotated1753. Maximum Score From Removing Stones1754. Largest Merge Of Two Strings1755. Closest Subsequence Sum1756. Design Most Recently Used Queue1757. Recyclable and Low Fat Products1758. Minimum Changes To Make Alternating Binary String1759. Count Number of Homogenous Substrings1760. Minimum Limit of Balls in a Bag1761. Minimum Degree of a Connected Trio in a Graph1762. Buildings With an Ocean View1763. Longest Nice Substring1764. Form Array by Concatenating Subarrays of Another Array1765. Map of Highest Peak1766. Tree of Coprimes1767. Find the Subtasks That Did Not Execute1768. Merge Strings Alternately1769. Minimum Number of Operations to Move All Balls to Each Box1770. Maximum Score from Performing Multiplication Operations1771. Maximize Palindrome Length From Subsequences1772. Sort Features by Popularity1773. Count Items Matching a Rule1774. Closest Dessert Cost1775. Equal Sum Arrays With Minimum Number of Operations1776. Car Fleet II1777. Product's Price for Each Store1778. Shortest Path in a Hidden Grid1779. Find Nearest Point That Has the Same X or Y Coordinate1780. Check if Number is a Sum of Powers of Three1781. Sum of Beauty of All Substrings1782. Count Pairs Of Nodes1783. Grand Slam Titles1784. Check if Binary String Has at Most One Segment of Ones1785. Minimum Elements to Add to Form a Given Sum1786. Number of Restricted Paths From First to Last Node1787. Make the XOR of All Segments Equal to Zero1788. Maximize the Beauty of the Garden1789. Primary Department for Each Employee1790. Check if One String Swap Can Make Strings Equal1791. Find Center of Star Graph1792. Maximum Average Pass Ratio1793. Maximum Score of a Good Subarray1794. Count Pairs of Equal Substrings With Minimum Difference1795. Rearrange Products Table1796. Second Largest Digit in a String1797. Design Authentication Manager1798. Maximum Number of Consecutive Values You Can Make1799. Maximize Score After N Operations1800. Maximum Ascending Subarray Sum1801. Number of Orders in the Backlog1802. Maximum Value at a Given Index in a Bounded Array1803. Count Pairs With XOR in a Range1804. Implement Trie II (solutions/Prefix Tree)1805. Number of Different Integers in a String1806. Minimum Number of Operations to Reinitialize a Permutation1807. Evaluate the Bracket Pairs of a String1808. Maximize Number of Nice Divisors1809. Ad-Free Sessions1810. Minimum Path Cost in a Hidden Grid1811. Find Interview Candidates1812. Determine Color of a Chessboard Square1813. Sentence Similarity III1814. Count Nice Pairs in an Array1815. Maximum Number of Groups Getting Fresh Donuts1816. Truncate Sentence1817. Finding the Users Active Minutes1818. Minimum Absolute Sum Difference1819. Number of Different Subsequences GCDs1820. Maximum Number of Accepted Invitations1821. Find Customers With Positive Revenue this Year1822. Sign of the Product of an Array1823. Find the Winner of the Circular Game1824. Minimum Sideway Jumps1825. Finding MK Average1826. Faulty Sensor1827. Minimum Operations to Make the Array Increasing1828. Queries on Number of Points Inside a Circle1829. Maximum XOR for Each Query1830. Minimum Number of Operations to Make String Sorted1831. Maximum Transaction Each Day1832. Check if the Sentence Is Pangram1833. Maximum Ice Cream Bars1834. Single-Threaded CPU1835. Find XOR Sum of All Pairs Bitwise AND1836. Remove Duplicates From an Unsorted Linked List1837. Sum of Digits in Base K1838. Frequency of the Most Frequent Element1839. Longest Substring Of All Vowels in Order1840. Maximum Building Height1841. League Statistics1842. Next Palindrome Using Same Digits1843. Suspicious Bank Accounts1844. Replace All Digits with Characters1845. Seat Reservation Manager1846. Maximum Element After Decreasing and Rearranging1847. Closest Room1848. Minimum Distance to the Target Element1849. Splitting a String Into Descending Consecutive Values1850. Minimum Adjacent Swaps to Reach the Kth Smallest Number1851. Minimum Interval to Include Each Query1852. Distinct Numbers in Each Subarray1853. Convert Date Format1854. Maximum Population Year1855. Maximum Distance Between a Pair of Values1856. Maximum Subarray Min-Product1857. Largest Color Value in a Directed Graph1858. Longest Word With All Prefixes1859. Sorting the Sentence1860. Incremental Memory Leak1861. Rotating the Box1862. Sum of Floored Pairs1863. Sum of All Subset XOR Totals1864. Minimum Number of Swaps to Make the Binary String Alternating1865. Finding Pairs With a Certain Sum1866. Number of Ways to Rearrange Sticks With K Sticks Visible1867. Orders With Maximum Quantity Above Average1868. Product of Two Run-Length Encoded Arrays1869. Longer Contiguous Segments of Ones than Zeros1870. Minimum Speed to Arrive on Time1871. Jump Game VII1872. Stone Game VIII1873. Calculate Special Bonus1874. Minimize Product Sum of Two Arrays1875. Group Employees of the Same Salary1876. Substrings of Size Three with Distinct Characters1877. Minimize Maximum Pair Sum in Array1878. Get Biggest Three Rhombus Sums in a Grid1879. Minimum XOR Sum of Two Arrays1880. Check if Word Equals Summation of Two Words1881. Maximum Value after Insertion1882. Process Tasks Using Servers1883. Minimum Skips to Arrive at Meeting On Time1884. Egg Drop With 2 Eggs and N Floors1885. Count Pairs in Two Arrays1886. Determine Whether Matrix Can Be Obtained By Rotation1887. Reduction Operations to Make the Array Elements Equal1888. Minimum Number of Flips to Make the Binary String Alternating1889. Minimum Space Wasted From Packaging1890. The Latest Login in 20201891. Cutting Ribbons1892. Page Recommendations II1893. Check if All the Integers in a Range Are Covered1894. Find the Student that Will Replace the Chalk1895. Largest Magic Square1896. Minimum Cost to Change the Final Value of Expression1897. Redistribute Characters to Make All Strings Equal1898. Maximum Number of Removable Characters1899. Merge Triplets to Form Target Triplet1900. The Earliest and Latest Rounds Where Players Compete1901. Find a Peak Element II1902. Depth of BST Given Insertion Order1903. Largest Odd Number in String1904. The Number of Full Rounds You Have Played1905. Count Sub Islands1906. Minimum Absolute Difference Queries1907. Count Salary Categories1908. Game of Nim1909. Remove One Element to Make the Array Strictly Increasing1910. Remove All Occurrences of a Substring1911. Maximum Alternating Subsequence Sum1912. Design Movie Rental System1913. Maximum Product Difference Between Two Pairs1914. Cyclically Rotating a Grid1915. Number of Wonderful Substrings1916. Count Ways to Build Rooms in an Ant Colony1917. Leetcodify Friends Recommendations1918. Kth Smallest Subarray Sum1919. Leetcodify Similar Friends1920. Build Array from Permutation1921. Eliminate Maximum Number of Monsters1922. Count Good Numbers1923. Longest Common Subpath1924. Erect the Fence II1925. Count Square Sum Triples1926. Nearest Exit from Entrance in Maze1927. Sum Game1928. Minimum Cost to Reach Destination in Time1929. Concatenation of Array1930. Unique Length-3 Palindromic Subsequences1931. Painting a Grid With Three Different Colors1932. Merge BSTs to Create Single BST1933. Check if String Is Decomposable Into Value-Equal Substrings1934. Confirmation Rate1935. Maximum Number of Words You Can Type1936. Add Minimum Number of Rungs1937. Maximum Number of Points with Cost1938. Maximum Genetic Difference Query1939. Users That Actively Request Confirmation Messages1940. Longest Common Subsequence Between Sorted Arrays1941. Check if All Characters Have Equal Number of Occurrences1942. The Number of the Smallest Unoccupied Chair1943. Describe the Painting1944. Number of Visible People in a Queue1945. Sum of Digits of String After Convert1946. Largest Number After Mutating Substring1947. Maximum Compatibility Score Sum1948. Delete Duplicate Folders in System1949. Strong Friendship1950. Maximum of Minimum Values in All Subarrays1951. All the Pairs With the Maximum Number of Common Followers1952. Three Divisors1953. Maximum Number of Weeks for Which You Can Work1954. Minimum Garden Perimeter to Collect Enough Apples1955. Count Number of Special Subsequences1956. Minimum Time For K Virus Variants to Spread1957. Delete Characters to Make Fancy String1958. Check if Move is Legal1959. Minimum Total Space Wasted With K Resizing Operations1960. Maximum Product of the Length of Two Palindromic Substrings1961. Check If String Is a Prefix of Array1962. Remove Stones to Minimize the Total1963. Minimum Number of Swaps to Make the String Balanced1964. Find the Longest Valid Obstacle Course at Each Position1965. Employees With Missing Information1966. Binary Searchable Numbers in an Unsorted Array1967. Number of Strings That Appear as Substrings in Word1968. Array With Elements Not Equal to Average of Neighbors1969. Minimum Non-Zero Product of the Array Elements1970. Last Day Where You Can Still Cross1971. Find if Path Exists in Graph1972. First and Last Call On the Same Day1973. Count Nodes Equal to Sum of Descendants1974. Minimum Time to Type Word Using Special Typewriter1975. Maximum Matrix Sum1976. Number of Ways to Arrive at Destination1977. Number of Ways to Separate Numbers1978. Employees Whose Manager Left the Company1979. Find Greatest Common Divisor of Array1980. Find Unique Binary String1981. Minimize the Difference Between Target and Chosen Elements1982. Find Array Given Subset Sums1983. Widest Pair of Indices With Equal Range Sum1984. Minimum Difference Between Highest and Lowest of K Scores1985. Find the Kth Largest Integer in the Array1986. Minimum Number of Work Sessions to Finish the Tasks1987. Number of Unique Good Subsequences1988. Find Cutoff Score for Each School1989. Maximum Number of People That Can Be Caught in Tag1990. Count the Number of Experiments1991. Find the Middle Index in Array1992. Find All Groups of Farmland1993. Operations on Tree1994. The Number of Good Subsets1995. Count Special Quadruplets1996. The Number of Weak Characters in the Game1997. First Day Where You Have Been in All the Rooms1998. GCD Sort of an Array1999. Smallest Greater Multiple Made of Two Digits2000. Reverse Prefix of Word2001. Number of Pairs of Interchangeable Rectangles2002. Maximum Product of the Length of Two Palindromic Subsequences2003. Smallest Missing Genetic Value in Each Subtree2004. The Number of Seniors and Juniors to Join the Company2005. Subtree Removal Game with Fibonacci Tree2006. Count Number of Pairs With Absolute Difference K2007. Find Original Array From Doubled Array2008. Maximum Earnings From Taxi2009. Minimum Number of Operations to Make Array Continuous2010. The Number of Seniors and Juniors to Join the Company II2011. Final Value of Variable After Performing Operations2012. Sum of Beauty in the Array2013. Detect Squares2014. Longest Subsequence Repeated k Times2015. Average Height of Buildings in Each Segment2016. Maximum Difference Between Increasing Elements2017. Grid Game2018. Check if Word Can Be Placed In Crossword2019. The Score of Students Solving Math Expression
Last updated