@@ -34,7 +34,6 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.18'
34
34
> [ "For coding interview preparation, LeetCode is one of the best online resource providing a rich library of more than 300 real coding interview questions for you to practice from using one of the 7 supported languages - C, C++, Java, Python, C#, JavaScript, Ruby."] ( https://www.quora.com/How-effective-is-Leetcode-for-preparing-for-technical-interviews )
35
35
36
36
##
37
- * [ Algorithm I] ( #algorithm-i )
38
37
* [ Algorithm II] ( #algorithm-ii )
39
38
* [ Binary Search I] ( #binary-search-i )
40
39
* [ Binary Search II] ( #binary-search-ii )
@@ -48,109 +47,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.18'
48
47
* [ Udemy] ( #udemy )
49
48
* [ Data Structure I] ( #data-structure-i )
50
49
* [ Data Structure II] ( #data-structure-ii )
51
-
52
- ### Algorithm I
53
-
54
- #### Day 1 Binary Search
55
-
56
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
57
- |-|-|-|-|-|-
58
- | 0704 |[ Binary Search] ( src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt ) | Easy | Array, Binary_Search | 261 | 77.91
59
- | 0278 |[ First Bad Version] ( src/main/kotlin/g0201_0300/s0278_first_bad_version/Solution.kt ) | Easy | Binary_Search, Interactive | 349 | 76.86
60
- | 0035 |[ Search Insert Position] ( src/main/kotlin/g0001_0100/s0035_search_insert_position/Solution.kt ) | Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_ Space_O(1) | 159 | 93.03
61
-
62
- #### Day 2 Two Pointers
63
-
64
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
65
- |-|-|-|-|-|-
66
- | 0977 |[ Squares of a Sorted Array] ( src/main/kotlin/g0901_1000/s0977_squares_of_a_sorted_array/Solution.kt ) | Easy | Array, Sorting, Two_Pointers | 271 | 77.17
67
- | 0189 |[ Rotate Array] ( src/main/kotlin/g0101_0200/s0189_rotate_array/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_ Space_O(1) | 483 | 86.95
68
-
69
- #### Day 3 Two Pointers
70
-
71
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
72
- |-|-|-|-|-|-
73
- | 0283 |[ Move Zeroes] ( src/main/kotlin/g0201_0300/s0283_move_zeroes/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_ Space_O(1) | 516 | 79.07
74
- | 0167 |[ Two Sum II - Input Array Is Sorted] ( src/main/kotlin/g0101_0200/s0167_two_sum_ii_input_array_is_sorted/Solution.kt ) | Medium | Array, Binary_Search, Two_Pointers | 403 | 68.74
75
-
76
- #### Day 4 Two Pointers
77
-
78
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
79
- |-|-|-|-|-|-
80
- | 0344 |[ Reverse String] ( src/main/kotlin/g0301_0400/s0344_reverse_string/Solution.kt ) | Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 445 | 69.75
81
- | 0557 |[ Reverse Words in a String III] ( src/main/kotlin/g0501_0600/s0557_reverse_words_in_a_string_iii/Solution.kt ) | Easy | String, Two_Pointers | 215 | 98.10
82
-
83
- #### Day 5 Two Pointers
84
-
85
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
86
- |-|-|-|-|-|-
87
- | 0876 |[ Middle of the Linked List] ( src/main/kotlin/g0801_0900/s0876_middle_of_the_linked_list/Solution.kt ) | Easy | Two_Pointers, Linked_List | 136 | 76.52
88
- | 0019 |[ Remove Nth Node From End of List] ( src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_ Space_O(L) | 144 | 96.28
89
-
90
- #### Day 6 Sliding Window
91
-
92
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
93
- |-|-|-|-|-|-
94
- | 0003 |[ Longest Substring Without Repeating Characters] ( src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_ Space_O(1) | 201 | 87.28
95
- | 0567 |[ Permutation in String] ( src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt ) | Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 169 | 100.00
96
-
97
- #### Day 7 Breadth First Search Depth First Search
98
-
99
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
100
- |-|-|-|-|-|-
101
- | 0733 |[ Flood Fill] ( src/main/kotlin/g0701_0800/s0733_flood_fill/Solution.kt ) | Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 230 | 97.76
102
- | 0695 |[ Max Area of Island] ( src/main/kotlin/g0601_0700/s0695_max_area_of_island/Solution.kt ) | Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 324 | 24.06
103
-
104
- #### Day 8 Breadth First Search Depth First Search
105
-
106
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
107
- |-|-|-|-|-|-
108
- | 0617 |[ Merge Two Binary Trees] ( src/main/kotlin/g0601_0700/s0617_merge_two_binary_trees/Solution.kt ) | Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 243 | 72.83
109
- | 0116 |[ Populating Next Right Pointers in Each Node] ( src/main/kotlin/g0101_0200/s0116_populating_next_right_pointers_in_each_node/Solution.kt ) | Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 355 | 69.02
110
-
111
- #### Day 9 Breadth First Search Depth First Search
112
-
113
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
114
- |-|-|-|-|-|-
115
- | 0542 |[ 01 Matrix] ( src/main/kotlin/g0501_0600/s0542_01_matrix/Solution.kt ) | Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 441 | 94.06
116
- | 0994 |[ Rotting Oranges] ( src/main/kotlin/g0901_1000/s0994_rotting_oranges/Solution.kt ) | Medium | Array, Breadth_First_Search, Matrix | 164 | 82.95
117
-
118
- #### Day 10 Recursion Backtracking
119
-
120
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
121
- |-|-|-|-|-|-
122
- | 0021 |[ Merge Two Sorted Lists] ( src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_ Space_O(m+n) | 157 | 92.24
123
- | 0206 |[ Reverse Linked List] ( src/main/kotlin/g0201_0300/s0206_reverse_linked_list/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_ Space_O(1) | 279 | 45.78
124
-
125
- #### Day 11 Recursion Backtracking
126
-
127
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
128
- |-|-|-|-|-|-
129
- | 0077 |[ Combinations] ( src/main/kotlin/g0001_0100/s0077_combinations/Solution.kt ) | Medium | Backtracking | 232 | 100.00
130
- | 0046 |[ Permutations] ( src/main/kotlin/g0001_0100/s0046_permutations/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\* n!)_ Space_O(n+n!) | 188 | 99.00
131
- | 0784 |[ Letter Case Permutation] ( src/main/kotlin/g0701_0800/s0784_letter_case_permutation/Solution.kt ) | Medium | String, Bit_Manipulation, Backtracking | 219 | 84.62
132
-
133
- #### Day 12 Dynamic Programming
134
-
135
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
136
- |-|-|-|-|-|-
137
- | 0070 |[ Climbing Stairs] ( src/main/kotlin/g0001_0100/s0070_climbing_stairs/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_ Space_O(n) | 124 | 71.98
138
- | 0198 |[ House Robber] ( src/main/kotlin/g0101_0200/s0198_house_robber/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_ Space_O(n) | 156 | 92.24
139
- | 0120 |[ Triangle] ( src/main/kotlin/g0101_0200/s0120_triangle/Solution.kt ) | Medium | Array, Dynamic_Programming | 194 | 97.87
140
-
141
- #### Day 13 Bit Manipulation
142
-
143
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
144
- |-|-|-|-|-|-
145
- | 0231 |[ Power of Two] ( src/main/kotlin/g0201_0300/s0231_power_of_two/Solution.kt ) | Easy | Math, Bit_Manipulation, Recursion | 161 | 86.81
146
- | 0191 |[ Number of 1 Bits] ( src/main/kotlin/g0101_0200/s0191_number_of_1_bits/Solution.kt ) | Easy | Top_Interview_Questions, Bit_Manipulation | 237 | 68.44
147
-
148
- #### Day 14 Bit Manipulation
149
-
150
- | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
151
- |-|-|-|-|-|-
152
- | 0190 |[ Reverse Bits] ( src/main/kotlin/g0101_0200/s0190_reverse_bits/Solution.kt ) | Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 198 | 81.82
153
- | 0136 |[ Single Number] ( src/main/kotlin/g0101_0200/s0136_single_number/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_ Space_O(1) | 344 | 83.63
50
+ * [ Algorithm I] ( #algorithm-i )
154
51
155
52
### Algorithm II
156
53
@@ -1844,6 +1741,109 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.18'
1844
1741
| 0451 |[ Sort Characters By Frequency] ( src/main/kotlin/g0401_0500/s0451_sort_characters_by_frequency/Solution.kt ) | Medium | String, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Bucket_Sort | 288 | 81.72
1845
1742
| 0973 |[ K Closest Points to Origin] ( src/main/kotlin/g0901_1000/s0973_k_closest_points_to_origin/Solution.kt ) | Medium | Array, Math, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Geometry, Quickselect | 800 | 37.89
1846
1743
1744
+ ### Algorithm I
1745
+
1746
+ #### Day 1 Binary Search
1747
+
1748
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1749
+ |-|-|-|-|-|-
1750
+ | 0704 |[ Binary Search] ( src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt ) | Easy | Array, Binary_Search | 261 | 77.91
1751
+ | 0278 |[ First Bad Version] ( src/main/kotlin/g0201_0300/s0278_first_bad_version/Solution.kt ) | Easy | Binary_Search, Interactive | 349 | 76.86
1752
+ | 0035 |[ Search Insert Position] ( src/main/kotlin/g0001_0100/s0035_search_insert_position/Solution.kt ) | Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_ Space_O(1) | 159 | 93.03
1753
+
1754
+ #### Day 2 Two Pointers
1755
+
1756
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1757
+ |-|-|-|-|-|-
1758
+ | 0977 |[ Squares of a Sorted Array] ( src/main/kotlin/g0901_1000/s0977_squares_of_a_sorted_array/Solution.kt ) | Easy | Array, Sorting, Two_Pointers | 271 | 77.17
1759
+ | 0189 |[ Rotate Array] ( src/main/kotlin/g0101_0200/s0189_rotate_array/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_ Space_O(1) | 483 | 86.95
1760
+
1761
+ #### Day 3 Two Pointers
1762
+
1763
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1764
+ |-|-|-|-|-|-
1765
+ | 0283 |[ Move Zeroes] ( src/main/kotlin/g0201_0300/s0283_move_zeroes/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_ Space_O(1) | 516 | 79.07
1766
+ | 0167 |[ Two Sum II - Input Array Is Sorted] ( src/main/kotlin/g0101_0200/s0167_two_sum_ii_input_array_is_sorted/Solution.kt ) | Medium | Array, Binary_Search, Two_Pointers | 403 | 68.74
1767
+
1768
+ #### Day 4 Two Pointers
1769
+
1770
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1771
+ |-|-|-|-|-|-
1772
+ | 0344 |[ Reverse String] ( src/main/kotlin/g0301_0400/s0344_reverse_string/Solution.kt ) | Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 445 | 69.75
1773
+ | 0557 |[ Reverse Words in a String III] ( src/main/kotlin/g0501_0600/s0557_reverse_words_in_a_string_iii/Solution.kt ) | Easy | String, Two_Pointers | 215 | 98.10
1774
+
1775
+ #### Day 5 Two Pointers
1776
+
1777
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1778
+ |-|-|-|-|-|-
1779
+ | 0876 |[ Middle of the Linked List] ( src/main/kotlin/g0801_0900/s0876_middle_of_the_linked_list/Solution.kt ) | Easy | Two_Pointers, Linked_List | 136 | 76.52
1780
+ | 0019 |[ Remove Nth Node From End of List] ( src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_ Space_O(L) | 144 | 96.28
1781
+
1782
+ #### Day 6 Sliding Window
1783
+
1784
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1785
+ |-|-|-|-|-|-
1786
+ | 0003 |[ Longest Substring Without Repeating Characters] ( src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_ Space_O(1) | 201 | 87.28
1787
+ | 0567 |[ Permutation in String] ( src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt ) | Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 169 | 100.00
1788
+
1789
+ #### Day 7 Breadth First Search Depth First Search
1790
+
1791
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1792
+ |-|-|-|-|-|-
1793
+ | 0733 |[ Flood Fill] ( src/main/kotlin/g0701_0800/s0733_flood_fill/Solution.kt ) | Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 230 | 97.76
1794
+ | 0695 |[ Max Area of Island] ( src/main/kotlin/g0601_0700/s0695_max_area_of_island/Solution.kt ) | Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 324 | 24.06
1795
+
1796
+ #### Day 8 Breadth First Search Depth First Search
1797
+
1798
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1799
+ |-|-|-|-|-|-
1800
+ | 0617 |[ Merge Two Binary Trees] ( src/main/kotlin/g0601_0700/s0617_merge_two_binary_trees/Solution.kt ) | Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 243 | 72.83
1801
+ | 0116 |[ Populating Next Right Pointers in Each Node] ( src/main/kotlin/g0101_0200/s0116_populating_next_right_pointers_in_each_node/Solution.kt ) | Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 355 | 69.02
1802
+
1803
+ #### Day 9 Breadth First Search Depth First Search
1804
+
1805
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1806
+ |-|-|-|-|-|-
1807
+ | 0542 |[ 01 Matrix] ( src/main/kotlin/g0501_0600/s0542_01_matrix/Solution.kt ) | Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 441 | 94.06
1808
+ | 0994 |[ Rotting Oranges] ( src/main/kotlin/g0901_1000/s0994_rotting_oranges/Solution.kt ) | Medium | Array, Breadth_First_Search, Matrix | 164 | 82.95
1809
+
1810
+ #### Day 10 Recursion Backtracking
1811
+
1812
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1813
+ |-|-|-|-|-|-
1814
+ | 0021 |[ Merge Two Sorted Lists] ( src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_ Space_O(m+n) | 157 | 92.24
1815
+ | 0206 |[ Reverse Linked List] ( src/main/kotlin/g0201_0300/s0206_reverse_linked_list/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_ Space_O(1) | 279 | 45.78
1816
+
1817
+ #### Day 11 Recursion Backtracking
1818
+
1819
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1820
+ |-|-|-|-|-|-
1821
+ | 0077 |[ Combinations] ( src/main/kotlin/g0001_0100/s0077_combinations/Solution.kt ) | Medium | Backtracking | 232 | 100.00
1822
+ | 0046 |[ Permutations] ( src/main/kotlin/g0001_0100/s0046_permutations/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\* n!)_ Space_O(n+n!) | 188 | 99.00
1823
+ | 0784 |[ Letter Case Permutation] ( src/main/kotlin/g0701_0800/s0784_letter_case_permutation/Solution.kt ) | Medium | String, Bit_Manipulation, Backtracking | 219 | 84.62
1824
+
1825
+ #### Day 12 Dynamic Programming
1826
+
1827
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1828
+ |-|-|-|-|-|-
1829
+ | 0070 |[ Climbing Stairs] ( src/main/kotlin/g0001_0100/s0070_climbing_stairs/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_ Space_O(n) | 124 | 71.98
1830
+ | 0198 |[ House Robber] ( src/main/kotlin/g0101_0200/s0198_house_robber/Solution.kt ) | Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_ Space_O(n) | 156 | 92.24
1831
+ | 0120 |[ Triangle] ( src/main/kotlin/g0101_0200/s0120_triangle/Solution.kt ) | Medium | Array, Dynamic_Programming | 194 | 97.87
1832
+
1833
+ #### Day 13 Bit Manipulation
1834
+
1835
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1836
+ |-|-|-|-|-|-
1837
+ | 0231 |[ Power of Two] ( src/main/kotlin/g0201_0300/s0231_power_of_two/Solution.kt ) | Easy | Math, Bit_Manipulation, Recursion | 161 | 86.81
1838
+ | 0191 |[ Number of 1 Bits] ( src/main/kotlin/g0101_0200/s0191_number_of_1_bits/Solution.kt ) | Easy | Top_Interview_Questions, Bit_Manipulation | 237 | 68.44
1839
+
1840
+ #### Day 14 Bit Manipulation
1841
+
1842
+ | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
1843
+ |-|-|-|-|-|-
1844
+ | 0190 |[ Reverse Bits] ( src/main/kotlin/g0101_0200/s0190_reverse_bits/Solution.kt ) | Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 198 | 81.82
1845
+ | 0136 |[ Single Number] ( src/main/kotlin/g0101_0200/s0136_single_number/Solution.kt ) | Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_ Space_O(1) | 344 | 83.63
1846
+
1847
1847
## Contributing
1848
1848
Your ideas/fixes/algorithms are more than welcome!
1849
1849
0 commit comments