Git Product home page Git Product logo

coding-practice's Introduction

Table of Contents

Solution Summary
Difficulty

Solution Summary

ID Problem Leetcode ID Categories Difficulty
1 Get Maximum in Generated Array 1646 Array, Dynamic Programming, Simulation Easy
2 Minimum Deletions to Make Character Frequencies Unique 1647 String, Greedy, Sorting Medium
3 Sell Diminishing-Valued Colored Balls 1648 Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue) Medium
4 Design an Ordered Stream 1656 Array, Hash Table, Design, Data Stream Easy
5 Determine if Two Strings Are Close 1657 Hash Table, String, Sorting Medium
6 Maximize Grid Happiness 1659 Dynamic Programming, Bit Manipulation, Memoization, Bitmask Hard
7 Minimum Operations to Reduce X to Zero 1658 Array, Hash Table, Two Pointers, Binary Search, Prefix Sum Medium
8 Check If Two String Arrays are Equivalent 1662 Array, String Easy
9 Smallest String With A Given Numeric Value 1663 String, Greedy Medium
10 Richest Customer Wealth 1672 Array, Matrix Easy
11 Find the Most Competitive Subsequence 1673 Array, Stack, Greedy, Monotonic Stack Medium
12 Minimum Moves to Make Array Complementary 1674 Array, Hash Table, Prefix Sum Medium
13 Minimize Deviation in Array 1675 Array, Greedy, Heap (Priority Queue), Ordered Set Hard
14 Partitioning Into Minimum Number Of Deci-Binary Numbers 1689 String, Greedy Medium
15 Stone Game VII 1690 Array, Math, Dynamic Programming, Game Theory Medium
16 Reformat Phone Number 1694 String Easy
17 Maximum Erasure Value 1695 Array, Hash Table, Sliding Window Medium
18 Top K Frequent Elements 347 Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect Medium
19 Swapping Nodes in a Linked List 1721 Linked List, Two Pointers Medium
20 Decode XORed Array 1720 Array, Bit Manipulation Easy
21 Minimize Hamming Distance After Swap Operations 1722 Array, Depth-First Search, Union Find Medium
22 Find Minimum Time to Finish All Jobs 1723 Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask Hard
23 Cat and Mouse II 1728 Math, Dynamic Programming, Breadth-First Search, Graph, Memoization, Game Theory Hard
24 Best Time to Buy and Sell Stock 121 Array, Dynamic Programming Easy
25 Best Time to Buy and Sell Stock II 122 Array, Dynamic Programming, Greedy Easy
26 Latest Time by Replacing Hidden Digits 1736 String, Greedy Easy
27 Change Minimum Characters to Satisfy One of Three Conditions 1737 Hash Table, String, Counting, Prefix Sum Medium
28 Building Boxes 1739 Math, Binary Search, Greedy Hard
29 Maximum Number of Balls in a Box 1742 Hash Table, Math, Counting Easy
30 Restore the Array From Adjacent Pairs 1743 Array, Hash Table Medium
31 Can You Eat Your Favorite Candy on Your Favorite Day? 1744 Array, Prefix Sum Medium
32 Palindrome Partitioning IV 1745 String, Dynamic Programming Hard
33 Minimum Changes To Make Alternating Binary String 1758 String Easy
34 Count Number of Homogenous Substrings 1759 Math, String Medium
35 Minimum Limit of Balls in a Bag 1760 Array, Binary Search Medium
36 Minimum Degree of a Connected Trio in a Graph 1761 Graph Hard
37 Merge Strings Alternately 1768 Two Pointers, String Easy
38 Maximum Score from Performing Multiplication Operations 1770 Array, Dynamic Programming Medium
39 Maximize Palindrome Length From Subsequences 1771 String, Dynamic Programming Hard
40 Minimum Number of Operations to Move All Balls to Each Box 1769 Array, String Medium
41 Check if Binary String Has at Most One Segment of Ones 1784 String Easy
42 Check if One String Swap Can Make Strings Equal 1790 Hash Table, String, Counting Easy
43 Find Center of Star Graph 1791 Graph Easy
44 Maximum Score of a Good Subarray 1793 Array, Two Pointers, Stack, Monotonic Stack Hard
45 Maximum Ascending Subarray Sum 1800 Array Easy
46 Number of Orders in the Backlog 1801 Array, Heap (Priority Queue), Simulation Medium
47 Maximum Value at a Given Index in a Bounded Array 1802 Binary Search, Greedy Medium
48 Number of Different Integers in a String 1805 Hash Table, String Easy
49 Minimum Number of Operations to Reinitialize a Permutation 1806 Array, Math, Simulation Medium
50 Evaluate the Bracket Pairs of a String 1807 Array, Hash Table, String Medium
51 Maximize Number of Nice Divisors 1808 Math, Recursion Hard
52 Find the Winner of the Circular Game 1823 Array, Math, Recursion, Queue, Simulation Medium
53 Sign of the Product of an Array 1822 Array, Math Easy
54 Check if the Sentence Is Pangram 1832 Hash Table, String Easy
55 Single-Threaded CPU 1834 Array, Sorting, Heap (Priority Queue) Medium
56 Find XOR Sum of All Pairs Bitwise AND 1835 Array, Math, Bit Manipulation Hard
57 Maximum Ice Cream Bars 1833 Array, Greedy, Sorting Medium
58 Frequency of the Most Frequent Element 1838 Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum Medium
59 Maximum Building Height 1840 Array, Math Hard
60 Longest Substring Of All Vowels in Order 1839 String, Sliding Window Medium
61 Sum of Digits in Base K 1837 Math Easy
62 Maximum Population Year 1854 Array, Counting Easy
63 Maximum Subarray Min-Product 1856 Array, Stack, Monotonic Stack, Prefix Sum Medium
64 Maximum Distance Between a Pair of Values 1855 Array, Two Pointers, Binary Search, Greedy Medium
65 Two Sum 1 Array, Hash Table Easy
66 Largest Color Value in a Directed Graph 1857 Hash Table, Dynamic Programming, Graph, Topological Sort, Memoization, Counting Hard
67 Maximum Average Pass Ratio 1792 Array, Greedy, Heap (Priority Queue) Medium
68 Count of Matches in Tournament 1688 Math, Simulation Easy
69 Longer Contiguous Segments of Ones than Zeros 1869 String Easy
70 Minimum Speed to Arrive on Time 1870 Array, Binary Search Medium
71 Jump Game VII 1871 Two Pointers, String, Prefix Sum Medium
72 Stone Game VIII 1872 Array, Math, Dynamic Programming, Prefix Sum, Game Theory Hard
73 Path Sum 112 Tree, Depth-First Search, Binary Tree Easy
74 Path Sum II 113 Backtracking, Tree, Depth-First Search, Binary Tree Medium
75 Check if Word Equals Summation of Two Words 1880 String Easy
76 Maximum Value after Insertion 1881 String, Greedy Medium
77 Determine Whether Matrix Can Be Obtained By Rotation 1886 Array, Matrix Easy
78 Reduction Operations to Make the Array Elements Equal 1887 Array, Sorting Medium
79 Redistribute Characters to Make All Strings Equal 1897 Hash Table, String, Counting Easy
80 Maximum Number of Removable Characters 1898 Array, String, Binary Search Medium
81 Merge Triplets to Form Target Triplet 1899 Array, Greedy Medium
82 Maximum Product Difference Between Two Pairs 1913 Array, Sorting Easy
83 Cyclically Rotating a Grid 1914 Array, Matrix, Simulation Medium
84 Build Array from Permutation 1920 Array, Simulation Easy
85 Eliminate Maximum Number of Monsters 1921 Array, Greedy, Sorting Medium
86 Count Good Numbers 1922 Math, Recursion Medium
87 Concatenation of Array 1929 Array Easy
88 Unique Length-3 Palindromic Subsequences 1930 Hash Table, String, Prefix Sum Medium
89 Maximum Number of Words You Can Type 1935 Hash Table, String Easy
90 Add Minimum Number of Rungs 1936 Array, Greedy Medium
91 Maximum Number of Points with Cost 1937 Array, Dynamic Programming Medium
92 Painting a Grid With Three Different Colors 1931 Dynamic Programming Hard
93 Final Value of Variable After Performing Operations 2011 Array, String, Simulation Easy
94 Sum of Beauty in the Array 2012 Array Medium
95 Detect Squares 2013 Array, Hash Table, Design, Counting Medium
96 Maximum Difference Between Increasing Elements 2016 Array Easy
97 Grid Game 2017 Array, Matrix, Prefix Sum Medium
98 Check if Word Can Be Placed In Crossword 2018 Array, Matrix, Enumeration Medium
99 The Score of Students Solving Math Expression 2019 Array, Math, String, Dynamic Programming, Stack, Memoization Hard
100 Minimum Moves to Convert String 2027 String, Greedy Easy
101 Find Missing Observations 2028 Array, Math, Simulation Medium
102 Stone Game IX 2029 Array, Math, Greedy, Counting, Game Theory Medium
103 Two Out of Three 2032 Array, Hash Table Easy
104 Minimum Operations to Make a Uni-Value Grid 2033 Array, Math, Sorting, Matrix Medium
105 Check if Numbers Are Ascending in a Sentence 2042 String Easy
106 Simple Bank System 2043 Array, Hash Table, Design, Simulation Medium
107 Count Number of Maximum Bitwise-OR Subsets 2044 Array, Backtracking, Bit Manipulation Medium
108 Second Minimum Time to Reach Destination 2045 Array, Breadth-First Search, Graph, Shortest Path Hard
109 Number of Valid Words in a Sentence 2047 String Easy
110 Next Greater Numerically Balanced Number 2048 Math, Backtracking, Enumeration Medium
111 Count Nodes With the Highest Score 2049 Array, Tree, Depth-First Search, Binary Tree Medium
112 Count Vowel Substrings of a String 2062 Hash Table, String Easy
113 Vowels of All Substrings 2063 Math, String, Dynamic Programming, Combinatorics Medium
114 Ugly Number 263 Math Easy
115 Ugly Number II 264 Hash Table, Math, Dynamic Programming, Heap (Priority Queue) Medium
116 Minimized Maximum of Products Distributed to Any Store 2064 Array, Binary Search Medium
117 Time Needed to Buy Tickets 2073 Array, Queue, Simulation Easy
118 Reverse Nodes in Even Length Groups 2074 Linked List Medium
119 Decode the Slanted Ciphertext 2075 String, Simulation Medium
120 Two Furthest Houses With Different Colors 2078 Array, Greedy Easy
121 Watering Plants 2079 Array Medium
122 Range Frequency Queries 2080 Array, Hash Table, Binary Search, Design, Segment Tree Medium
123 Sum of k-Mirror Numbers 2081 Math, Enumeration Hard
124 Course Schedule 207 Depth-First Search, Breadth-First Search, Graph, Topological Sort Medium
125 Course Schedule IV 1462 Depth-First Search, Breadth-First Search, Graph, Topological Sort Medium
126 Unique Binary Search Trees 96 Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree Medium
127 Unique Binary Search Trees II 95 Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree Medium

Difficulty

Easy Questions

ID Problem Leetcode ID Categories
1 Get Maximum in Generated Array 1646 Array, Dynamic Programming, Simulation
2 Design an Ordered Stream 1656 Array, Hash Table, Design, Data Stream
3 Check If Two String Arrays are Equivalent 1662 Array, String
4 Richest Customer Wealth 1672 Array, Matrix
5 Reformat Phone Number 1694 String
6 Decode XORed Array 1720 Array, Bit Manipulation
7 Best Time to Buy and Sell Stock 121 Array, Dynamic Programming
8 Best Time to Buy and Sell Stock II 122 Array, Dynamic Programming, Greedy
9 Latest Time by Replacing Hidden Digits 1736 String, Greedy
10 Maximum Number of Balls in a Box 1742 Hash Table, Math, Counting
11 Minimum Changes To Make Alternating Binary String 1758 String
12 Merge Strings Alternately 1768 Two Pointers, String
13 Check if Binary String Has at Most One Segment of Ones 1784 String
14 Check if One String Swap Can Make Strings Equal 1790 Hash Table, String, Counting
15 Find Center of Star Graph 1791 Graph
16 Maximum Ascending Subarray Sum 1800 Array
17 Number of Different Integers in a String 1805 Hash Table, String
18 Sign of the Product of an Array 1822 Array, Math
19 Check if the Sentence Is Pangram 1832 Hash Table, String
20 Sum of Digits in Base K 1837 Math
21 Maximum Population Year 1854 Array, Counting
22 Two Sum 1 Array, Hash Table
23 Count of Matches in Tournament 1688 Math, Simulation
24 Longer Contiguous Segments of Ones than Zeros 1869 String
25 Path Sum 112 Tree, Depth-First Search, Binary Tree
26 Check if Word Equals Summation of Two Words 1880 String
27 Determine Whether Matrix Can Be Obtained By Rotation 1886 Array, Matrix
28 Redistribute Characters to Make All Strings Equal 1897 Hash Table, String, Counting
29 Maximum Product Difference Between Two Pairs 1913 Array, Sorting
30 Build Array from Permutation 1920 Array, Simulation
31 Concatenation of Array 1929 Array
32 Maximum Number of Words You Can Type 1935 Hash Table, String
33 Final Value of Variable After Performing Operations 2011 Array, String, Simulation
34 Maximum Difference Between Increasing Elements 2016 Array
35 Minimum Moves to Convert String 2027 String, Greedy
36 Two Out of Three 2032 Array, Hash Table
37 Check if Numbers Are Ascending in a Sentence 2042 String
38 Number of Valid Words in a Sentence 2047 String
39 Count Vowel Substrings of a String 2062 Hash Table, String
40 Ugly Number 263 Math
41 Time Needed to Buy Tickets 2073 Array, Queue, Simulation
42 Two Furthest Houses With Different Colors 2078 Array, Greedy

Medium Questions

ID Problem Leetcode ID Categories
1 Minimum Deletions to Make Character Frequencies Unique 1647 String, Greedy, Sorting
2 Sell Diminishing-Valued Colored Balls 1648 Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue)
3 Determine if Two Strings Are Close 1657 Hash Table, String, Sorting
4 Minimum Operations to Reduce X to Zero 1658 Array, Hash Table, Two Pointers, Binary Search, Prefix Sum
5 Smallest String With A Given Numeric Value 1663 String, Greedy
6 Find the Most Competitive Subsequence 1673 Array, Stack, Greedy, Monotonic Stack
7 Minimum Moves to Make Array Complementary 1674 Array, Hash Table, Prefix Sum
8 Partitioning Into Minimum Number Of Deci-Binary Numbers 1689 String, Greedy
9 Stone Game VII 1690 Array, Math, Dynamic Programming, Game Theory
10 Maximum Erasure Value 1695 Array, Hash Table, Sliding Window
11 Top K Frequent Elements 347 Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
12 Swapping Nodes in a Linked List 1721 Linked List, Two Pointers
13 Minimize Hamming Distance After Swap Operations 1722 Array, Depth-First Search, Union Find
14 Change Minimum Characters to Satisfy One of Three Conditions 1737 Hash Table, String, Counting, Prefix Sum
15 Restore the Array From Adjacent Pairs 1743 Array, Hash Table
16 Can You Eat Your Favorite Candy on Your Favorite Day? 1744 Array, Prefix Sum
17 Count Number of Homogenous Substrings 1759 Math, String
18 Minimum Limit of Balls in a Bag 1760 Array, Binary Search
19 Maximum Score from Performing Multiplication Operations 1770 Array, Dynamic Programming
20 Minimum Number of Operations to Move All Balls to Each Box 1769 Array, String
21 Number of Orders in the Backlog 1801 Array, Heap (Priority Queue), Simulation
22 Maximum Value at a Given Index in a Bounded Array 1802 Binary Search, Greedy
23 Minimum Number of Operations to Reinitialize a Permutation 1806 Array, Math, Simulation
24 Evaluate the Bracket Pairs of a String 1807 Array, Hash Table, String
25 Find the Winner of the Circular Game 1823 Array, Math, Recursion, Queue, Simulation
26 Single-Threaded CPU 1834 Array, Sorting, Heap (Priority Queue)
27 Maximum Ice Cream Bars 1833 Array, Greedy, Sorting
28 Frequency of the Most Frequent Element 1838 Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
29 Longest Substring Of All Vowels in Order 1839 String, Sliding Window
30 Maximum Subarray Min-Product 1856 Array, Stack, Monotonic Stack, Prefix Sum
31 Maximum Distance Between a Pair of Values 1855 Array, Two Pointers, Binary Search, Greedy
32 Maximum Average Pass Ratio 1792 Array, Greedy, Heap (Priority Queue)
33 Minimum Speed to Arrive on Time 1870 Array, Binary Search
34 Jump Game VII 1871 Two Pointers, String, Prefix Sum
35 Path Sum II 113 Backtracking, Tree, Depth-First Search, Binary Tree
36 Maximum Value after Insertion 1881 String, Greedy
37 Reduction Operations to Make the Array Elements Equal 1887 Array, Sorting
38 Maximum Number of Removable Characters 1898 Array, String, Binary Search
39 Merge Triplets to Form Target Triplet 1899 Array, Greedy
40 Cyclically Rotating a Grid 1914 Array, Matrix, Simulation
41 Eliminate Maximum Number of Monsters 1921 Array, Greedy, Sorting
42 Count Good Numbers 1922 Math, Recursion
43 Unique Length-3 Palindromic Subsequences 1930 Hash Table, String, Prefix Sum
44 Add Minimum Number of Rungs 1936 Array, Greedy
45 Maximum Number of Points with Cost 1937 Array, Dynamic Programming
46 Sum of Beauty in the Array 2012 Array
47 Detect Squares 2013 Array, Hash Table, Design, Counting
48 Grid Game 2017 Array, Matrix, Prefix Sum
49 Check if Word Can Be Placed In Crossword 2018 Array, Matrix, Enumeration
50 Find Missing Observations 2028 Array, Math, Simulation
51 Stone Game IX 2029 Array, Math, Greedy, Counting, Game Theory
52 Minimum Operations to Make a Uni-Value Grid 2033 Array, Math, Sorting, Matrix
53 Simple Bank System 2043 Array, Hash Table, Design, Simulation
54 Count Number of Maximum Bitwise-OR Subsets 2044 Array, Backtracking, Bit Manipulation
55 Next Greater Numerically Balanced Number 2048 Math, Backtracking, Enumeration
56 Count Nodes With the Highest Score 2049 Array, Tree, Depth-First Search, Binary Tree
57 Vowels of All Substrings 2063 Math, String, Dynamic Programming, Combinatorics
58 Ugly Number II 264 Hash Table, Math, Dynamic Programming, Heap (Priority Queue)
59 Minimized Maximum of Products Distributed to Any Store 2064 Array, Binary Search
60 Reverse Nodes in Even Length Groups 2074 Linked List
61 Decode the Slanted Ciphertext 2075 String, Simulation
62 Watering Plants 2079 Array
63 Range Frequency Queries 2080 Array, Hash Table, Binary Search, Design, Segment Tree
64 Course Schedule 207 Depth-First Search, Breadth-First Search, Graph, Topological Sort
65 Course Schedule IV 1462 Depth-First Search, Breadth-First Search, Graph, Topological Sort
66 Unique Binary Search Trees 96 Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree
67 Unique Binary Search Trees II 95 Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree

Hard Questions

ID Problem Leetcode ID Categories
1 Maximize Grid Happiness 1659 Dynamic Programming, Bit Manipulation, Memoization, Bitmask
2 Minimize Deviation in Array 1675 Array, Greedy, Heap (Priority Queue), Ordered Set
3 Find Minimum Time to Finish All Jobs 1723 Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
4 Cat and Mouse II 1728 Math, Dynamic Programming, Breadth-First Search, Graph, Memoization, Game Theory
5 Building Boxes 1739 Math, Binary Search, Greedy
6 Palindrome Partitioning IV 1745 String, Dynamic Programming
7 Minimum Degree of a Connected Trio in a Graph 1761 Graph
8 Maximize Palindrome Length From Subsequences 1771 String, Dynamic Programming
9 Maximum Score of a Good Subarray 1793 Array, Two Pointers, Stack, Monotonic Stack
10 Maximize Number of Nice Divisors 1808 Math, Recursion
11 Find XOR Sum of All Pairs Bitwise AND 1835 Array, Math, Bit Manipulation
12 Maximum Building Height 1840 Array, Math
13 Largest Color Value in a Directed Graph 1857 Hash Table, Dynamic Programming, Graph, Topological Sort, Memoization, Counting
14 Stone Game VIII 1872 Array, Math, Dynamic Programming, Prefix Sum, Game Theory
15 Painting a Grid With Three Different Colors 1931 Dynamic Programming
16 The Score of Students Solving Math Expression 2019 Array, Math, String, Dynamic Programming, Stack, Memoization
17 Second Minimum Time to Reach Destination 2045 Array, Breadth-First Search, Graph, Shortest Path
18 Sum of k-Mirror Numbers 2081 Math, Enumeration

Automatically generated using Leet2Git.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.