|
2 | 2 | [](https://github.com/javadev/LeetCode-in-Kotlin/fork)
|
3 | 3 | > ["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)
|
4 | 4 |
|
5 |
| -* [Algorithm I](#algorithm-i) |
6 | 5 | * [Algorithm II](#algorithm-ii)
|
7 | 6 | * [Binary Search I](#binary-search-i)
|
8 | 7 | * [Binary Search II](#binary-search-ii)
|
|
16 | 15 | * [Udemy](#udemy)
|
17 | 16 | * [Data Structure I](#data-structure-i)
|
18 | 17 | * [Data Structure II](#data-structure-ii)
|
19 |
| - |
20 |
| -### Algorithm I |
21 |
| - |
22 |
| -#### Day 1 Binary Search |
23 |
| - |
24 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
25 |
| -|-|-|-|-|-|- |
26 |
| -| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search)| Easy | Array, Binary_Search | 261 | 77.91 |
27 |
| -| 0278 |[First Bad Version](src/main/kotlin/g0201_0300/s0278_first_bad_version)| Easy | Binary_Search, Interactive | 349 | 76.86 |
28 |
| -| 0035 |[Search Insert Position](src/main/kotlin/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 159 | 93.03 |
29 |
| - |
30 |
| -#### Day 2 Two Pointers |
31 |
| - |
32 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
33 |
| -|-|-|-|-|-|- |
34 |
| -| 0977 |[Squares of a Sorted Array](src/main/kotlin/g0901_1000/s0977_squares_of_a_sorted_array)| Easy | Array, Sorting, Two_Pointers | 271 | 77.17 |
35 |
| -| 0189 |[Rotate Array](src/main/kotlin/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 483 | 86.95 |
36 |
| - |
37 |
| -#### Day 3 Two Pointers |
38 |
| - |
39 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
40 |
| -|-|-|-|-|-|- |
41 |
| -| 0283 |[Move Zeroes](src/main/kotlin/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 516 | 79.07 |
42 |
| -| 0167 |[Two Sum II - Input Array Is Sorted](src/main/kotlin/g0101_0200/s0167_two_sum_ii_input_array_is_sorted)| Medium | Array, Binary_Search, Two_Pointers | 403 | 68.74 |
43 |
| - |
44 |
| -#### Day 4 Two Pointers |
45 |
| - |
46 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
47 |
| -|-|-|-|-|-|- |
48 |
| -| 0344 |[Reverse String](src/main/kotlin/g0301_0400/s0344_reverse_string)| Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 445 | 69.75 |
49 |
| -| 0557 |[Reverse Words in a String III](src/main/kotlin/g0501_0600/s0557_reverse_words_in_a_string_iii)| Easy | String, Two_Pointers | 215 | 98.10 |
50 |
| - |
51 |
| -#### Day 5 Two Pointers |
52 |
| - |
53 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
54 |
| -|-|-|-|-|-|- |
55 |
| -| 0876 |[Middle of the Linked List](src/main/kotlin/g0801_0900/s0876_middle_of_the_linked_list)| Easy | Two_Pointers, Linked_List | 136 | 76.52 |
56 |
| -| 0019 |[Remove Nth Node From End of List](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_Space_O(L) | 144 | 96.28 |
57 |
| - |
58 |
| -#### Day 6 Sliding Window |
59 |
| - |
60 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
61 |
| -|-|-|-|-|-|- |
62 |
| -| 0003 |[Longest Substring Without Repeating Characters](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_Space_O(1) | 201 | 87.28 |
63 |
| -| 0567 |[Permutation in String](src/main/kotlin/g0501_0600/s0567_permutation_in_string)| Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 169 | 100.00 |
64 |
| - |
65 |
| -#### Day 7 Breadth First Search Depth First Search |
66 |
| - |
67 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
68 |
| -|-|-|-|-|-|- |
69 |
| -| 0733 |[Flood Fill](src/main/kotlin/g0701_0800/s0733_flood_fill)| Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 230 | 97.76 |
70 |
| -| 0695 |[Max Area of Island](src/main/kotlin/g0601_0700/s0695_max_area_of_island)| Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 324 | 24.06 |
71 |
| - |
72 |
| -#### Day 8 Breadth First Search Depth First Search |
73 |
| - |
74 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
75 |
| -|-|-|-|-|-|- |
76 |
| -| 0617 |[Merge Two Binary Trees](src/main/kotlin/g0601_0700/s0617_merge_two_binary_trees)| Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 243 | 72.83 |
77 |
| -| 0116 |[Populating Next Right Pointers in Each Node](src/main/kotlin/g0101_0200/s0116_populating_next_right_pointers_in_each_node)| Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 355 | 69.02 |
78 |
| - |
79 |
| -#### Day 9 Breadth First Search Depth First Search |
80 |
| - |
81 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
82 |
| -|-|-|-|-|-|- |
83 |
| -| 0542 |[01 Matrix](src/main/kotlin/g0501_0600/s0542_01_matrix)| Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 441 | 94.06 |
84 |
| -| 0994 |[Rotting Oranges](src/main/kotlin/g0901_1000/s0994_rotting_oranges)| Medium | Array, Breadth_First_Search, Matrix | 164 | 82.95 |
85 |
| - |
86 |
| -#### Day 10 Recursion Backtracking |
87 |
| - |
88 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
89 |
| -|-|-|-|-|-|- |
90 |
| -| 0021 |[Merge Two Sorted Lists](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_Space_O(m+n) | 157 | 92.24 |
91 |
| -| 0206 |[Reverse Linked List](src/main/kotlin/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_Space_O(1) | 279 | 45.78 |
92 |
| - |
93 |
| -#### Day 11 Recursion Backtracking |
94 |
| - |
95 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
96 |
| -|-|-|-|-|-|- |
97 |
| -| 0077 |[Combinations](src/main/kotlin/g0001_0100/s0077_combinations)| Medium | Backtracking | 232 | 100.00 |
98 |
| -| 0046 |[Permutations](src/main/kotlin/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 188 | 99.00 |
99 |
| -| 0784 |[Letter Case Permutation](src/main/kotlin/g0701_0800/s0784_letter_case_permutation)| Medium | String, Bit_Manipulation, Backtracking | 219 | 84.62 |
100 |
| - |
101 |
| -#### Day 12 Dynamic Programming |
102 |
| - |
103 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
104 |
| -|-|-|-|-|-|- |
105 |
| -| 0070 |[Climbing Stairs](src/main/kotlin/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_Space_O(n) | 124 | 71.98 |
106 |
| -| 0198 |[House Robber](src/main/kotlin/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 156 | 92.24 |
107 |
| -| 0120 |[Triangle](src/main/kotlin/g0101_0200/s0120_triangle)| Medium | Array, Dynamic_Programming | 194 | 97.87 |
108 |
| - |
109 |
| -#### Day 13 Bit Manipulation |
110 |
| - |
111 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
112 |
| -|-|-|-|-|-|- |
113 |
| -| 0231 |[Power of Two](src/main/kotlin/g0201_0300/s0231_power_of_two)| Easy | Math, Bit_Manipulation, Recursion | 161 | 86.81 |
114 |
| -| 0191 |[Number of 1 Bits](src/main/kotlin/g0101_0200/s0191_number_of_1_bits)| Easy | Top_Interview_Questions, Bit_Manipulation | 237 | 68.44 |
115 |
| - |
116 |
| -#### Day 14 Bit Manipulation |
117 |
| - |
118 |
| -| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
119 |
| -|-|-|-|-|-|- |
120 |
| -| 0190 |[Reverse Bits](src/main/kotlin/g0101_0200/s0190_reverse_bits)| Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 198 | 81.82 |
121 |
| -| 0136 |[Single Number](src/main/kotlin/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 344 | 83.63 |
| 18 | +* [Algorithm I](#algorithm-i) |
122 | 19 |
|
123 | 20 | ### Algorithm II
|
124 | 21 |
|
|
1812 | 1709 | | 0451 |[Sort Characters By Frequency](src/main/kotlin/g0401_0500/s0451_sort_characters_by_frequency)| Medium | String, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Bucket_Sort | 288 | 81.72
|
1813 | 1710 | | 0973 |[K Closest Points to Origin](src/main/kotlin/g0901_1000/s0973_k_closest_points_to_origin)| Medium | Array, Math, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Geometry, Quickselect | 800 | 37.89
|
1814 | 1711 |
|
| 1712 | +### Algorithm I |
| 1713 | + |
| 1714 | +#### Day 1 Binary Search |
| 1715 | + |
| 1716 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1717 | +|-|-|-|-|-|- |
| 1718 | +| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search)| Easy | Array, Binary_Search | 261 | 77.91 |
| 1719 | +| 0278 |[First Bad Version](src/main/kotlin/g0201_0300/s0278_first_bad_version)| Easy | Binary_Search, Interactive | 349 | 76.86 |
| 1720 | +| 0035 |[Search Insert Position](src/main/kotlin/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 159 | 93.03 |
| 1721 | + |
| 1722 | +#### Day 2 Two Pointers |
| 1723 | + |
| 1724 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1725 | +|-|-|-|-|-|- |
| 1726 | +| 0977 |[Squares of a Sorted Array](src/main/kotlin/g0901_1000/s0977_squares_of_a_sorted_array)| Easy | Array, Sorting, Two_Pointers | 271 | 77.17 |
| 1727 | +| 0189 |[Rotate Array](src/main/kotlin/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 483 | 86.95 |
| 1728 | + |
| 1729 | +#### Day 3 Two Pointers |
| 1730 | + |
| 1731 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1732 | +|-|-|-|-|-|- |
| 1733 | +| 0283 |[Move Zeroes](src/main/kotlin/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 516 | 79.07 |
| 1734 | +| 0167 |[Two Sum II - Input Array Is Sorted](src/main/kotlin/g0101_0200/s0167_two_sum_ii_input_array_is_sorted)| Medium | Array, Binary_Search, Two_Pointers | 403 | 68.74 |
| 1735 | + |
| 1736 | +#### Day 4 Two Pointers |
| 1737 | + |
| 1738 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1739 | +|-|-|-|-|-|- |
| 1740 | +| 0344 |[Reverse String](src/main/kotlin/g0301_0400/s0344_reverse_string)| Easy | Top_Interview_Questions, String, Two_Pointers, Recursion | 445 | 69.75 |
| 1741 | +| 0557 |[Reverse Words in a String III](src/main/kotlin/g0501_0600/s0557_reverse_words_in_a_string_iii)| Easy | String, Two_Pointers | 215 | 98.10 |
| 1742 | + |
| 1743 | +#### Day 5 Two Pointers |
| 1744 | + |
| 1745 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1746 | +|-|-|-|-|-|- |
| 1747 | +| 0876 |[Middle of the Linked List](src/main/kotlin/g0801_0900/s0876_middle_of_the_linked_list)| Easy | Two_Pointers, Linked_List | 136 | 76.52 |
| 1748 | +| 0019 |[Remove Nth Node From End of List](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Big_O_Time_O(L)_Space_O(L) | 144 | 96.28 |
| 1749 | + |
| 1750 | +#### Day 6 Sliding Window |
| 1751 | + |
| 1752 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1753 | +|-|-|-|-|-|- |
| 1754 | +| 0003 |[Longest Substring Without Repeating Characters](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n)_Space_O(1) | 201 | 87.28 |
| 1755 | +| 0567 |[Permutation in String](src/main/kotlin/g0501_0600/s0567_permutation_in_string)| Medium | String, Hash_Table, Two_Pointers, Sliding_Window | 169 | 100.00 |
| 1756 | + |
| 1757 | +#### Day 7 Breadth First Search Depth First Search |
| 1758 | + |
| 1759 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1760 | +|-|-|-|-|-|- |
| 1761 | +| 0733 |[Flood Fill](src/main/kotlin/g0701_0800/s0733_flood_fill)| Easy | Array, Depth_First_Search, Breadth_First_Search, Matrix | 230 | 97.76 |
| 1762 | +| 0695 |[Max Area of Island](src/main/kotlin/g0601_0700/s0695_max_area_of_island)| Medium | Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find | 324 | 24.06 |
| 1763 | + |
| 1764 | +#### Day 8 Breadth First Search Depth First Search |
| 1765 | + |
| 1766 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1767 | +|-|-|-|-|-|- |
| 1768 | +| 0617 |[Merge Two Binary Trees](src/main/kotlin/g0601_0700/s0617_merge_two_binary_trees)| Easy | Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree | 243 | 72.83 |
| 1769 | +| 0116 |[Populating Next Right Pointers in Each Node](src/main/kotlin/g0101_0200/s0116_populating_next_right_pointers_in_each_node)| Medium | Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Linked_List | 355 | 69.02 |
| 1770 | + |
| 1771 | +#### Day 9 Breadth First Search Depth First Search |
| 1772 | + |
| 1773 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1774 | +|-|-|-|-|-|- |
| 1775 | +| 0542 |[01 Matrix](src/main/kotlin/g0501_0600/s0542_01_matrix)| Medium | Array, Dynamic_Programming, Breadth_First_Search, Matrix | 441 | 94.06 |
| 1776 | +| 0994 |[Rotting Oranges](src/main/kotlin/g0901_1000/s0994_rotting_oranges)| Medium | Array, Breadth_First_Search, Matrix | 164 | 82.95 |
| 1777 | + |
| 1778 | +#### Day 10 Recursion Backtracking |
| 1779 | + |
| 1780 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1781 | +|-|-|-|-|-|- |
| 1782 | +| 0021 |[Merge Two Sorted Lists](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(m+n)_Space_O(m+n) | 157 | 92.24 |
| 1783 | +| 0206 |[Reverse Linked List](src/main/kotlin/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Big_O_Time_O(N)_Space_O(1) | 279 | 45.78 |
| 1784 | + |
| 1785 | +#### Day 11 Recursion Backtracking |
| 1786 | + |
| 1787 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1788 | +|-|-|-|-|-|- |
| 1789 | +| 0077 |[Combinations](src/main/kotlin/g0001_0100/s0077_combinations)| Medium | Backtracking | 232 | 100.00 |
| 1790 | +| 0046 |[Permutations](src/main/kotlin/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 188 | 99.00 |
| 1791 | +| 0784 |[Letter Case Permutation](src/main/kotlin/g0701_0800/s0784_letter_case_permutation)| Medium | String, Bit_Manipulation, Backtracking | 219 | 84.62 |
| 1792 | + |
| 1793 | +#### Day 12 Dynamic Programming |
| 1794 | + |
| 1795 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1796 | +|-|-|-|-|-|- |
| 1797 | +| 0070 |[Climbing Stairs](src/main/kotlin/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Big_O_Time_O(n)_Space_O(n) | 124 | 71.98 |
| 1798 | +| 0198 |[House Robber](src/main/kotlin/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 156 | 92.24 |
| 1799 | +| 0120 |[Triangle](src/main/kotlin/g0101_0200/s0120_triangle)| Medium | Array, Dynamic_Programming | 194 | 97.87 |
| 1800 | + |
| 1801 | +#### Day 13 Bit Manipulation |
| 1802 | + |
| 1803 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1804 | +|-|-|-|-|-|- |
| 1805 | +| 0231 |[Power of Two](src/main/kotlin/g0201_0300/s0231_power_of_two)| Easy | Math, Bit_Manipulation, Recursion | 161 | 86.81 |
| 1806 | +| 0191 |[Number of 1 Bits](src/main/kotlin/g0101_0200/s0191_number_of_1_bits)| Easy | Top_Interview_Questions, Bit_Manipulation | 237 | 68.44 |
| 1807 | + |
| 1808 | +#### Day 14 Bit Manipulation |
| 1809 | + |
| 1810 | +| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> |
| 1811 | +|-|-|-|-|-|- |
| 1812 | +| 0190 |[Reverse Bits](src/main/kotlin/g0101_0200/s0190_reverse_bits)| Easy | Top_Interview_Questions, Bit_Manipulation, Divide_and_Conquer | 198 | 81.82 |
| 1813 | +| 0136 |[Single Number](src/main/kotlin/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 344 | 83.63 |
| 1814 | + |
1815 | 1815 | ## Algorithms
|
1816 | 1816 |
|
1817 | 1817 | | # | Title | Difficulty | Tag | Time, ms | Time, %
|
|
0 commit comments