diff --git a/README.md b/README.md index 15834f387..3c76321ad 100644 --- a/README.md +++ b/README.md @@ -526,7 +526,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Top_100_Liked_Questions, Array, Binary_Search | 261 | 77.91 +| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Array, Binary_Search | 261 | 77.91 | 0278 |[First Bad Version](src/main/kotlin/g0201_0300/s0278_first_bad_version/Solution.kt)| Easy | Binary_Search, Interactive | 349 | 76.86 #### Day 8 Binary Search Tree @@ -599,7 +599,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String | 154 | 89.70 +| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_Interview_Questions, String | 154 | 89.70 | 0043 |[Multiply Strings](src/main/kotlin/g0001_0100/s0043_multiply_strings/Solution.kt)| Medium | String, Math, Simulation | 165 | 96.72 #### Day 3 Linked List @@ -635,7 +635,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- | 0543 |[Diameter of Binary Tree](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 307 | 43.93 -| 0437 |[Path Sum III](src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt)| Medium | Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Big_O_Time_O(n)_Space_O(n) | 403 | 54.12 +| 0437 |[Path Sum III](src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Big_O_Time_O(n)_Space_O(n) | 403 | 54.12 #### Day 8 Binary Search @@ -648,7 +648,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 +| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 | 0230 |[Kth Smallest Element in a BST](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst/Solution.kt)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 393 | 33.33 | 0173 |[Binary Search Tree Iterator](src/main/kotlin/g0101_0200/s0173_binary_search_tree_iterator/BSTIterator.kt)| Medium | Tree, Binary_Tree, Stack, Design, Binary_Search_Tree, Iterator | 563 | 46.91 @@ -750,7 +750,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- | 0344 |[Reverse String](src/main/kotlin/g0301_0400/s0344_reverse_string/Solution.kt)| Easy | String, Two_Pointers, Recursion | 445 | 69.75 -| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String | 154 | 89.70 +| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_Interview_Questions, String | 154 | 89.70 | 0187 |[Repeated DNA Sequences](src/main/kotlin/g0101_0200/s0187_repeated_dna_sequences/Solution.kt)| Medium | String, Hash_Table, Bit_Manipulation, Sliding_Window, Hash_Function, Rolling_Hash | 319 | 79.03 | 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), AI_can_be_used_to_solve_the_task | 201 | 87.28 | 0020 |[Valid Parentheses](src/main/kotlin/g0001_0100/s0020_valid_parentheses/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 137 | 88.76 @@ -765,7 +765,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Top_100_Liked_Questions, Array, Binary_Search | 261 | 77.91 +| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Array, Binary_Search | 261 | 77.91 | 0033 |[Search in Rotated Sorted Array](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array/Solution.kt)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 151 | 93.77 | 0153 |[Find Minimum in Rotated Sorted Array](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/Solution.kt)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 262 | 60.96 @@ -864,7 +864,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | 0145 |[Binary Tree Postorder Traversal](src/main/kotlin/g0101_0200/s0145_binary_tree_postorder_traversal/Solution.kt)| Easy | Depth_First_Search, Tree, Binary_Tree, Stack | 211 | 80.00 | 0102 |[Binary Tree Level Order Traversal](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal/Solution.kt)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 198 | 95.14 | 0103 |[Binary Tree Zigzag Level Order Traversal](src/main/kotlin/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/Solution.kt)| Medium | Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree | 176 | 71.62 -| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 +| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 | 1008 |[Construct Binary Search Tree from Preorder Traversal](src/main/kotlin/g1001_1100/s1008_construct_binary_search_tree_from_preorder_traversal/Solution.kt)| Medium | Array, Tree, Binary_Tree, Stack, Monotonic_Stack, Binary_Search_Tree | 145 | 100.00 | 0543 |[Diameter of Binary Tree](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 307 | 43.93 | 0938 |[Range Sum of BST](src/main/kotlin/g0901_1000/s0938_range_sum_of_bst/Solution.kt)| Easy | Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree | 356 | 55.36 @@ -968,10 +968,10 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | 0134 |[Gas Station](src/main/kotlin/g0101_0200/s0134_gas_station/Solution.kt)| Medium | Top_Interview_Questions, Array, Greedy | 545 | 70.18 | 0135 |[Candy](src/main/kotlin/g0101_0200/s0135_candy/Solution.kt)| Hard | Array, Greedy | 466 | 58.33 | 0042 |[Trapping Rain Water](src/main/kotlin/g0001_0100/s0042_trapping_rain_water/Solution.kt)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(1) | 189 | 99.37 -| 0013 |[Roman to Integer](src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Math | 211 | 83.47 +| 0013 |[Roman to Integer](src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt)| Easy | Top_Interview_Questions, String, Hash_Table, Math | 211 | 83.47 | 0012 |[Integer to Roman](src/main/kotlin/g0001_0100/s0012_integer_to_roman/Solution.kt)| Medium | String, Hash_Table, Math | 180 | 98.25 | 0058 |[Length of Last Word](src/main/kotlin/g0001_0100/s0058_length_of_last_word/Solution.kt)| Easy | String | 135 | 93.67 -| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String | 154 | 89.70 +| 0014 |[Longest Common Prefix](src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt)| Easy | Top_Interview_Questions, String | 154 | 89.70 | 0151 |[Reverse Words in a String](src/main/kotlin/g0101_0200/s0151_reverse_words_in_a_string/Solution.kt)| Medium | String, Two_Pointers, LeetCode_75_Array/String | 206 | 98.90 | 0006 |[Zigzag Conversion](src/main/kotlin/g0001_0100/s0006_zigzag_conversion/Solution.kt)| Medium | String | 200 | 97.79 | 0028 |[Find the Index of the First Occurrence in a String](src/main/kotlin/g0001_0100/s0028_find_the_index_of_the_first_occurrence_in_a_string/Solution.kt)| Easy | Top_Interview_Questions, String, Two_Pointers, String_Matching | 126 | 97.58 @@ -1134,7 +1134,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 +| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 | 0148 |[Sort List](src/main/kotlin/g0101_0200/s0148_sort_list/Solution.kt)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Sorting, Two_Pointers, Linked_List, Divide_and_Conquer, Merge_Sort, Big_O_Time_O(log(N))_Space_O(log(N)) | 820 | 61.70 | 0427 |[Construct Quad Tree](src/main/kotlin/g0401_0500/s0427_construct_quad_tree/Solution.kt)| Medium | Array, Tree, Matrix, Divide_and_Conquer | 221 | 94.74 | 0023 |[Merge k Sorted Lists](src/main/kotlin/g0001_0100/s0023_merge_k_sorted_lists/Solution.kt)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Heap_Priority_Queue, Linked_List, Divide_and_Conquer, Merge_Sort, Big_O_Time_O(k\*n\*log(k))_Space_O(log(k)) | 198 | 93.77 @@ -1371,7 +1371,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- | 0290 |[Word Pattern](src/main/kotlin/g0201_0300/s0290_word_pattern/Solution.kt)| Easy | String, Hash_Table | 177 | 89.55 -| 0763 |[Partition Labels](src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt)| Medium | String, Hash_Table, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 235 | 84.75 +| 0763 |[Partition Labels](src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt)| Medium | Top_100_Liked_Questions, String, Hash_Table, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 235 | 84.75 #### Day 8 String @@ -1427,7 +1427,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 +| 0108 |[Convert Sorted Array to Binary Search Tree](src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Tree, Binary_Tree, Binary_Search_Tree, Divide_and_Conquer | 167 | 80.29 | 0105 |[Construct Binary Tree from Preorder and Inorder Traversal](src/main/kotlin/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/Solution.kt)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Tree, Binary_Tree, Divide_and_Conquer, Big_O_Time_O(N)_Space_O(N) | 183 | 95.45 | 0103 |[Binary Tree Zigzag Level Order Traversal](src/main/kotlin/g0101_0200/s0103_binary_tree_zigzag_level_order_traversal/Solution.kt)| Medium | Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree | 176 | 71.62 @@ -1481,7 +1481,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Top_100_Liked_Questions, Array, Binary_Search | 261 | 77.91 +| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Array, Binary_Search | 261 | 77.91 | 0278 |[First Bad Version](src/main/kotlin/g0201_0300/s0278_first_bad_version/Solution.kt)| Easy | Binary_Search, Interactive | 349 | 76.86 | 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 @@ -1518,7 +1518,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- | 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), AI_can_be_used_to_solve_the_task | 201 | 87.28 -| 0567 |[Permutation in String](src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt)| Medium | Top_100_Liked_Questions, String, Hash_Table, Two_Pointers, Sliding_Window | 169 | 100.00 +| 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 #### Day 7 Breadth First Search Depth First Search @@ -1738,7 +1738,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' | | | | | | |-|-|-|-|-|- -| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Top_100_Liked_Questions, Array, Binary_Search | 261 | 77.91 +| 0704 |[Binary Search](src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt)| Easy | Array, Binary_Search | 261 | 77.91 | 0374 |[Guess Number Higher or Lower](src/main/kotlin/g0301_0400/s0374_guess_number_higher_or_lower/Solution.kt)| Easy | Binary_Search, Interactive, LeetCode_75_Binary_Search | 134 | 94.19 #### Day 2 @@ -2110,7 +2110,7 @@ implementation 'com.github.javadev:leetcode-in-kotlin:1.38' |-|-|-|-|-|- | 0377 |[Combination Sum IV](src/main/kotlin/g0301_0400/s0377_combination_sum_iv/Solution.kt)| Medium | Array, Dynamic_Programming | 217 | 72.41 | 0343 |[Integer Break](src/main/kotlin/g0301_0400/s0343_integer_break/Solution.kt)| Medium | Dynamic_Programming, Math | 218 | 63.89 -| 0279 |[Perfect Squares](src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt)| Medium | Dynamic_Programming, Math, Breadth_First_Search | 176 | 98.80 +| 0279 |[Perfect Squares](src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt)| Medium | Top_100_Liked_Questions, Dynamic_Programming, Math, Breadth_First_Search | 176 | 98.80 ## Contributing Your ideas/fixes/algorithms are more than welcome! diff --git a/src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt b/src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt index 219674349..6d7140be0 100644 --- a/src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt +++ b/src/main/kotlin/g0001_0100/s0013_roman_to_integer/Solution.kt @@ -1,7 +1,7 @@ package g0001_0100.s0013_roman_to_integer -// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Math -// #Top_Interview_150_Array/String #2023_07_03_Time_211_ms_(83.47%)_Space_36.9_MB_(91.66%) +// #Easy #Top_Interview_Questions #String #Hash_Table #Math #Top_Interview_150_Array/String +// #2023_07_03_Time_211_ms_(83.47%)_Space_36.9_MB_(91.66%) class Solution { fun romanToInt(s: String): Int { diff --git a/src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt b/src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt index cd9e6866d..dfe18f4d2 100644 --- a/src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt +++ b/src/main/kotlin/g0001_0100/s0014_longest_common_prefix/Solution.kt @@ -1,8 +1,7 @@ package g0001_0100.s0014_longest_common_prefix -// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #String #Level_2_Day_2_String -// #Udemy_Strings #Top_Interview_150_Array/String -// #2023_07_03_Time_154_ms_(89.70%)_Space_34.6_MB_(95.06%) +// #Easy #Top_Interview_Questions #String #Level_2_Day_2_String #Udemy_Strings +// #Top_Interview_150_Array/String #2023_07_03_Time_154_ms_(89.70%)_Space_34.6_MB_(95.06%) class Solution { fun longestCommonPrefix(strs: Array): String { diff --git a/src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt b/src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt index 3c0860052..56407170e 100644 --- a/src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt +++ b/src/main/kotlin/g0101_0200/s0108_convert_sorted_array_to_binary_search_tree/Solution.kt @@ -1,8 +1,9 @@ package g0101_0200.s0108_convert_sorted_array_to_binary_search_tree -// #Easy #Top_Interview_Questions #Array #Tree #Binary_Tree #Binary_Search_Tree #Divide_and_Conquer -// #Data_Structure_II_Day_15_Tree #Level_2_Day_9_Binary_Search_Tree #Udemy_Tree_Stack_Queue -// #Top_Interview_150_Divide_and_Conquer #2023_07_11_Time_167_ms_(80.29%)_Space_36.6_MB_(83.94%) +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Tree #Binary_Tree +// #Binary_Search_Tree #Divide_and_Conquer #Data_Structure_II_Day_15_Tree +// #Level_2_Day_9_Binary_Search_Tree #Udemy_Tree_Stack_Queue #Top_Interview_150_Divide_and_Conquer +// #2023_07_11_Time_167_ms_(80.29%)_Space_36.6_MB_(83.94%) import com_github_leetcode.TreeNode diff --git a/src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt b/src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt index b0dccb88b..8a33f594d 100644 --- a/src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt +++ b/src/main/kotlin/g0201_0300/s0279_perfect_squares/Solution.kt @@ -1,7 +1,7 @@ package g0201_0300.s0279_perfect_squares -// #Medium #Dynamic_Programming #Math #Breadth_First_Search #Dynamic_Programming_I_Day_21 -// #2022_11_03_Time_176_ms_(98.80%)_Space_33.3_MB_(98.80%) +// #Medium #Top_100_Liked_Questions #Dynamic_Programming #Math #Breadth_First_Search +// #Dynamic_Programming_I_Day_21 #2022_11_03_Time_176_ms_(98.80%)_Space_33.3_MB_(98.80%) @Suppress("NAME_SHADOWING") class Solution { diff --git a/src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt b/src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt index 29c247a12..fdf6616ac 100644 --- a/src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt +++ b/src/main/kotlin/g0401_0500/s0437_path_sum_iii/Solution.kt @@ -1,7 +1,8 @@ package g0401_0500.s0437_path_sum_iii -// #Medium #Depth_First_Search #Tree #Binary_Tree #LeetCode_75_Binary_Tree/DFS #Level_2_Day_7_Tree -// #Big_O_Time_O(n)_Space_O(n) #2022_09_11_Time_403_ms_(54.12%)_Space_41.7_MB_(62.35%) +// #Medium #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree +// #LeetCode_75_Binary_Tree/DFS #Level_2_Day_7_Tree #Big_O_Time_O(n)_Space_O(n) +// #2022_09_11_Time_403_ms_(54.12%)_Space_41.7_MB_(62.35%) import com_github_leetcode.TreeNode diff --git a/src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt b/src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt index 31a9b2b38..e1e1ecbbf 100644 --- a/src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt +++ b/src/main/kotlin/g0501_0600/s0567_permutation_in_string/Solution.kt @@ -1,7 +1,7 @@ package g0501_0600.s0567_permutation_in_string -// #Medium #Top_100_Liked_Questions #String #Hash_Table #Two_Pointers #Sliding_Window -// #Algorithm_I_Day_6_Sliding_Window #2023_01_23_Time_169_ms_(100.00%)_Space_35.6_MB_(85.86%) +// #Medium #String #Hash_Table #Two_Pointers #Sliding_Window #Algorithm_I_Day_6_Sliding_Window +// #2023_01_23_Time_169_ms_(100.00%)_Space_35.6_MB_(85.86%) class Solution { fun checkInclusion(s1: String, s2: String): Boolean { diff --git a/src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt b/src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt index de87c3a22..800374d94 100644 --- a/src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt +++ b/src/main/kotlin/g0701_0800/s0704_binary_search/Solution.kt @@ -1,7 +1,7 @@ package g0701_0800.s0704_binary_search -// #Easy #Top_100_Liked_Questions #Array #Binary_Search #Algorithm_I_Day_1_Binary_Search -// #Binary_Search_I_Day_1 #Level_1_Day_7_Binary_Search #Udemy_Binary_Search +// #Easy #Array #Binary_Search #Algorithm_I_Day_1_Binary_Search #Binary_Search_I_Day_1 +// #Level_1_Day_7_Binary_Search #Udemy_Binary_Search // #2023_02_23_Time_261_ms_(77.91%)_Space_38.7_MB_(34.19%) class Solution { diff --git a/src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt b/src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt index c4f9e9589..02137f7ee 100644 --- a/src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt +++ b/src/main/kotlin/g0701_0800/s0763_partition_labels/Solution.kt @@ -1,7 +1,8 @@ package g0701_0800.s0763_partition_labels -// #Medium #String #Hash_Table #Greedy #Two_Pointers #Data_Structure_II_Day_7_String -// #Big_O_Time_O(n)_Space_O(1) #2022_09_13_Time_235_ms_(84.75%)_Space_35.2_MB_(91.53%) +// #Medium #Top_100_Liked_Questions #String #Hash_Table #Greedy #Two_Pointers +// #Data_Structure_II_Day_7_String #Big_O_Time_O(n)_Space_O(1) +// #2022_09_13_Time_235_ms_(84.75%)_Space_35.2_MB_(91.53%) class Solution { fun partitionLabels(s: String): List { diff --git a/src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree/Solution.kt b/src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree/Solution.kt index 53ec98dc6..8e29f918c 100644 --- a/src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree/Solution.kt +++ b/src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree/Solution.kt @@ -1,6 +1,6 @@ package g3501_3600.s3585_find_weighted_median_node_in_tree -// #Hard #Array #Dynamic_Programming #Tree #Binary_Search #Depth_First_Search +// #Hard #Array #Dynamic_Programming #Depth_First_Search #Tree #Binary_Search // #2025_06_17_Time_123_ms_(100.00%)_Space_184.68_MB_(100.00%) import kotlin.math.ceil