diff --git a/README.md b/README.md index 0331e83..f7cccd3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # LeetCode-in-All -[![Maven Central](https://img.shields.io/maven-central/v/com.github.javadev/leetcode-in-all?style=flat-square)](https://central.sonatype.com/artifact/com.github.javadev/leetcode-in-all/1.2) +[![Maven Central](https://img.shields.io/maven-central/v/com.github.javadev/leetcode-in-all?style=flat-square)](https://central.sonatype.com/artifact/com.github.javadev/leetcode-in-all/1.3) [![Java CI](https://github.com/javadev/LeetCode-in-All/actions/workflows/maven.yml/badge.svg)](https://github.com/javadev/LeetCode-in-All/actions/workflows/maven.yml) [![CodeQL](https://github.com/javadev/LeetCode-in-All/actions/workflows/codeql.yml/badge.svg)](https://github.com/javadev/LeetCode-in-All/actions/workflows/codeql.yml) [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/javadev/LeetCode-in-All/blob/main/LICENSE) @@ -10,7 +10,6 @@ > ["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) ## -* [Level 2](#level-2) * [Udemy](#udemy) * [Data Structure I](#data-structure-i) * [Data Structure II](#data-structure-ii) @@ -24,129 +23,7 @@ * [Graph Theory I](#graph-theory-i) * [SQL I](#sql-i) * [Level 1](#level-1) - -### Level 2 - -#### Day 1 Implementation/Simulation - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 2 String - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 3 Linked List - -| | | | | | | -|-|-|-|-|-|-|- -| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/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) | 54 | 87.87 -| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 - -#### Day 4 Linked List - -| | | | | | | -|-|-|-|-|-|-|- -| 0148 |Sort List| [Java](src/main/java/g0101_0200/s0148_sort_list) [Kotlin](src/main/kotlin/g0101_0200/s0148_sort_list) [TypeScript](src/main/ts/g0101_0200/s0148_sort_list) [Scala](src/main/scala/g0101_0200/s0148_sort_list) [Ruby](src/main/ruby/g0101_0200/s0148_sort_list) [PHP](src/main/php/g0101_0200/s0148_sort_list) [C#](src/main/csharp/g0101_0200/s0148_sort_list) [Go](src/main/go/g0101_0200/s0148_sort_list) [Cpp](src/main/cpp/g0101_0200/s0148_sort_list) [Python](src/main/python/g0101_0200/s0148_sort_list) [Swift](src/main/swift/g0101_0200/s0148_sort_list) [Elixir](src/main/elixir/g0101_0200/s0148_sort_list)| 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)) | 141 | 97.14 - -#### Day 5 Greedy - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 6 Tree - -| | | | | | | -|-|-|-|-|-|-|- -| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 - -#### Day 7 Tree - -| | | | | | | -|-|-|-|-|-|-|- -| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 -| 0437 |Path Sum III| [Java](src/main/java/g0401_0500/s0437_path_sum_iii) [Kotlin](src/main/kotlin/g0401_0500/s0437_path_sum_iii) [TypeScript](src/main/ts/g0401_0500/s0437_path_sum_iii) [Scala](src/main/scala/g0401_0500/s0437_path_sum_iii) [Ruby](src/main/ruby/g0401_0500/s0437_path_sum_iii) [PHP](src/main/php/g0401_0500/s0437_path_sum_iii) [C#](src/main/csharp/g0401_0500/s0437_path_sum_iii) [Go](src/main/go/g0401_0500/s0437_path_sum_iii) [Cpp](src/main/cpp/g0401_0500/s0437_path_sum_iii) [Python](src/main/python/g0401_0500/s0437_path_sum_iii) [Swift](src/main/swift/g0401_0500/s0437_path_sum_iii) [Elixir](src/main/elixir/g0401_0500/s0437_path_sum_iii)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 68 | 86.71 - -#### Day 8 Binary Search - -| | | | | | | -|-|-|-|-|-|-|- -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 -| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 - -#### Day 9 Binary Search Tree - -| | | | | | | -|-|-|-|-|-|-|- -| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 - -#### Day 10 Graph/BFS/DFS - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 11 Graph/BFS/DFS - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 12 Dynamic Programming - -| | | | | | | -|-|-|-|-|-|-|- -| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 -| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 - -#### Day 13 Dynamic Programming - -| | | | | | | -|-|-|-|-|-|-|- -| 0416 |Partition Equal Subset Sum| [Java](src/main/java/g0401_0500/s0416_partition_equal_subset_sum) [Kotlin](src/main/kotlin/g0401_0500/s0416_partition_equal_subset_sum) [TypeScript](src/main/ts/g0401_0500/s0416_partition_equal_subset_sum) [Scala](src/main/scala/g0401_0500/s0416_partition_equal_subset_sum) [Ruby](src/main/ruby/g0401_0500/s0416_partition_equal_subset_sum) [PHP](src/main/php/g0401_0500/s0416_partition_equal_subset_sum) [C#](src/main/csharp/g0401_0500/s0416_partition_equal_subset_sum) [Go](src/main/go/g0401_0500/s0416_partition_equal_subset_sum) [Cpp](src/main/cpp/g0401_0500/s0416_partition_equal_subset_sum) [Python](src/main/python/g0401_0500/s0416_partition_equal_subset_sum) [Swift](src/main/swift/g0401_0500/s0416_partition_equal_subset_sum) [Elixir](src/main/elixir/g0401_0500/s0416_partition_equal_subset_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Big_O_Time_O(n\*sums)_Space_O(n\*sums) | 91 | 74.38 -| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 - -#### Day 14 Sliding Window/Two Pointer - -| | | | | | | -|-|-|-|-|-|-|- -| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/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) | 65 | 90.77 -| 0076 |Minimum Window Substring| [Java](src/main/java/g0001_0100/s0076_minimum_window_substring) [Kotlin](src/main/kotlin/g0001_0100/s0076_minimum_window_substring) [TypeScript](src/main/ts/g0001_0100/s0076_minimum_window_substring) [Scala](src/main/scala/g0001_0100/s0076_minimum_window_substring) [Ruby](src/main/ruby/g0001_0100/s0076_minimum_window_substring) [PHP](src/main/php/g0001_0100/s0076_minimum_window_substring) [C#](src/main/csharp/g0001_0100/s0076_minimum_window_substring) [Go](src/main/go/g0001_0100/s0076_minimum_window_substring) [Cpp](src/main/cpp/g0001_0100/s0076_minimum_window_substring) [Python](src/main/python/g0001_0100/s0076_minimum_window_substring) [Swift](src/main/swift/g0001_0100/s0076_minimum_window_substring) [Elixir](src/main/elixir/g0001_0100/s0076_minimum_window_substring)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(s.length())_Space_O(1) | 82 | 82.17 - -#### Day 15 Tree - -| | | | | | | -|-|-|-|-|-|-|- -| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 - -#### Day 16 Design - -| | | | | | | -|-|-|-|-|-|-|- -| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 -| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 - -#### Day 17 Interval - -| | | | | | | -|-|-|-|-|-|-|- -| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 - -#### Day 18 Stack - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 19 Union Find - -| | | | | | | -|-|-|-|-|-|-|- - -#### Day 20 Brute Force/Backtracking - -| | | | | | | -|-|-|-|-|-|-|- -| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 -| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 +* [Level 2](#level-2) ### Udemy @@ -154,54 +31,54 @@ | | | | | | | |-|-|-|-|-|-|- -| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 -| 0007 |Reverse Integer| [Java](src/main/java/g0001_0100/s0007_reverse_integer) [Kotlin](src/main/kotlin/g0001_0100/s0007_reverse_integer) [TypeScript](src/main/ts/g0001_0100/s0007_reverse_integer) [Scala](src/main/scala/g0001_0100/s0007_reverse_integer) [Ruby](src/main/ruby/g0001_0100/s0007_reverse_integer) [PHP](src/main/php/g0001_0100/s0007_reverse_integer) [C#](src/main/csharp/g0001_0100/s0007_reverse_integer) [Go](src/main/go/g0001_0100/s0007_reverse_integer) [Cpp](src/main/cpp/g0001_0100/s0007_reverse_integer) [Python](src/main/python/g0001_0100/s0007_reverse_integer) [Swift](src/main/swift/g0001_0100/s0007_reverse_integer) [Elixir](src/main/elixir/g0001_0100/s0007_reverse_integer)| Medium | Top_Interview_Questions, Math | 56 | 95.68 -| 0009 |Palindrome Number| [Java](src/main/java/g0001_0100/s0009_palindrome_number) [Kotlin](src/main/kotlin/g0001_0100/s0009_palindrome_number) [TypeScript](src/main/ts/g0001_0100/s0009_palindrome_number) [Scala](src/main/scala/g0001_0100/s0009_palindrome_number) [Ruby](src/main/ruby/g0001_0100/s0009_palindrome_number) [PHP](src/main/php/g0001_0100/s0009_palindrome_number) [C#](src/main/csharp/g0001_0100/s0009_palindrome_number) [Go](src/main/go/g0001_0100/s0009_palindrome_number) [Cpp](src/main/cpp/g0001_0100/s0009_palindrome_number) [Python](src/main/python/g0001_0100/s0009_palindrome_number) [Swift](src/main/swift/g0001_0100/s0009_palindrome_number) [Elixir](src/main/elixir/g0001_0100/s0009_palindrome_number)| Easy | Math | 137 | 88.64 +| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number) [Rust](src/main/rust/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 +| 0007 |Reverse Integer| [Java](src/main/java/g0001_0100/s0007_reverse_integer) [Kotlin](src/main/kotlin/g0001_0100/s0007_reverse_integer) [TypeScript](src/main/ts/g0001_0100/s0007_reverse_integer) [Scala](src/main/scala/g0001_0100/s0007_reverse_integer) [Ruby](src/main/ruby/g0001_0100/s0007_reverse_integer) [PHP](src/main/php/g0001_0100/s0007_reverse_integer) [C#](src/main/csharp/g0001_0100/s0007_reverse_integer) [Go](src/main/go/g0001_0100/s0007_reverse_integer) [Cpp](src/main/cpp/g0001_0100/s0007_reverse_integer) [Python](src/main/python/g0001_0100/s0007_reverse_integer) [Swift](src/main/swift/g0001_0100/s0007_reverse_integer) [Elixir](src/main/elixir/g0001_0100/s0007_reverse_integer) [Rust](src/main/rust/g0001_0100/s0007_reverse_integer)| Medium | Top_Interview_Questions, Math | 56 | 95.68 +| 0009 |Palindrome Number| [Java](src/main/java/g0001_0100/s0009_palindrome_number) [Kotlin](src/main/kotlin/g0001_0100/s0009_palindrome_number) [TypeScript](src/main/ts/g0001_0100/s0009_palindrome_number) [Scala](src/main/scala/g0001_0100/s0009_palindrome_number) [Ruby](src/main/ruby/g0001_0100/s0009_palindrome_number) [PHP](src/main/php/g0001_0100/s0009_palindrome_number) [C#](src/main/csharp/g0001_0100/s0009_palindrome_number) [Go](src/main/go/g0001_0100/s0009_palindrome_number) [Cpp](src/main/cpp/g0001_0100/s0009_palindrome_number) [Python](src/main/python/g0001_0100/s0009_palindrome_number) [Swift](src/main/swift/g0001_0100/s0009_palindrome_number) [Elixir](src/main/elixir/g0001_0100/s0009_palindrome_number) [Rust](src/main/rust/g0001_0100/s0009_palindrome_number)| Easy | Math | 137 | 88.64 #### Udemy Strings | | | | | | | |-|-|-|-|-|-|- -| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/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) | 65 | 90.77 -| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 -| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 -| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 -| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 +| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/g0001_0100/s0003_longest_substring_without_repeating_characters) [Rust](src/main/rust/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) | 65 | 90.77 +| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses) [Rust](src/main/rust/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 +| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring) [Rust](src/main/rust/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 +| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string) [Rust](src/main/rust/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 +| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams) [Rust](src/main/rust/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 #### Udemy Binary Search | | | | | | | |-|-|-|-|-|-|- -| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 -| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 +| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array) [Rust](src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 +| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Rust](src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 #### Udemy Arrays | | | | | | | |-|-|-|-|-|-|- -| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 -| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 -| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 -| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/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) | 75 | 97.25 -| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 -| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 -| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 -| 0041 |First Missing Positive| [Java](src/main/java/g0001_0100/s0041_first_missing_positive) [Kotlin](src/main/kotlin/g0001_0100/s0041_first_missing_positive) [TypeScript](src/main/ts/g0001_0100/s0041_first_missing_positive) [Scala](src/main/scala/g0001_0100/s0041_first_missing_positive) [Ruby](src/main/ruby/g0001_0100/s0041_first_missing_positive) [PHP](src/main/php/g0001_0100/s0041_first_missing_positive) [C#](src/main/csharp/g0001_0100/s0041_first_missing_positive) [Go](src/main/go/g0001_0100/s0041_first_missing_positive) [Cpp](src/main/cpp/g0001_0100/s0041_first_missing_positive) [Python](src/main/python/g0001_0100/s0041_first_missing_positive) [Swift](src/main/swift/g0001_0100/s0041_first_missing_positive) [Elixir](src/main/elixir/g0001_0100/s0041_first_missing_positive)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 55 | 98.51 -| 0239 |Sliding Window Maximum| [Java](src/main/java/g0201_0300/s0239_sliding_window_maximum) [Kotlin](src/main/kotlin/g0201_0300/s0239_sliding_window_maximum) [TypeScript](src/main/ts/g0201_0300/s0239_sliding_window_maximum) [Scala](src/main/scala/g0201_0300/s0239_sliding_window_maximum) [Ruby](src/main/ruby/g0201_0300/s0239_sliding_window_maximum) [PHP](src/main/php/g0201_0300/s0239_sliding_window_maximum) [C#](src/main/csharp/g0201_0300/s0239_sliding_window_maximum) [Go](src/main/go/g0201_0300/s0239_sliding_window_maximum) [Cpp](src/main/cpp/g0201_0300/s0239_sliding_window_maximum) [Python](src/main/python/g0201_0300/s0239_sliding_window_maximum) [Swift](src/main/swift/g0201_0300/s0239_sliding_window_maximum) [Elixir](src/main/elixir/g0201_0300/s0239_sliding_window_maximum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Heap_Priority_Queue, Sliding_Window, Queue, Monotonic_Queue, Big_O_Time_O(n\*k)_Space_O(n+k) | 216 | 99.50 +| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Rust](src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 +| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes) [Rust](src/main/rust/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 +| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum) [Rust](src/main/rust/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 +| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/g0101_0200/s0189_rotate_array) [Rust](src/main/rust/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) | 75 | 97.25 +| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game) [Rust](src/main/rust/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 +| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors) [Rust](src/main/rust/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 +| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self) [Rust](src/main/rust/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 +| 0041 |First Missing Positive| [Java](src/main/java/g0001_0100/s0041_first_missing_positive) [Kotlin](src/main/kotlin/g0001_0100/s0041_first_missing_positive) [TypeScript](src/main/ts/g0001_0100/s0041_first_missing_positive) [Scala](src/main/scala/g0001_0100/s0041_first_missing_positive) [Ruby](src/main/ruby/g0001_0100/s0041_first_missing_positive) [PHP](src/main/php/g0001_0100/s0041_first_missing_positive) [C#](src/main/csharp/g0001_0100/s0041_first_missing_positive) [Go](src/main/go/g0001_0100/s0041_first_missing_positive) [Cpp](src/main/cpp/g0001_0100/s0041_first_missing_positive) [Python](src/main/python/g0001_0100/s0041_first_missing_positive) [Swift](src/main/swift/g0001_0100/s0041_first_missing_positive) [Elixir](src/main/elixir/g0001_0100/s0041_first_missing_positive) [Rust](src/main/rust/g0001_0100/s0041_first_missing_positive)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 55 | 98.51 +| 0239 |Sliding Window Maximum| [Java](src/main/java/g0201_0300/s0239_sliding_window_maximum) [Kotlin](src/main/kotlin/g0201_0300/s0239_sliding_window_maximum) [TypeScript](src/main/ts/g0201_0300/s0239_sliding_window_maximum) [Scala](src/main/scala/g0201_0300/s0239_sliding_window_maximum) [Ruby](src/main/ruby/g0201_0300/s0239_sliding_window_maximum) [PHP](src/main/php/g0201_0300/s0239_sliding_window_maximum) [C#](src/main/csharp/g0201_0300/s0239_sliding_window_maximum) [Go](src/main/go/g0201_0300/s0239_sliding_window_maximum) [Cpp](src/main/cpp/g0201_0300/s0239_sliding_window_maximum) [Python](src/main/python/g0201_0300/s0239_sliding_window_maximum) [Swift](src/main/swift/g0201_0300/s0239_sliding_window_maximum) [Elixir](src/main/elixir/g0201_0300/s0239_sliding_window_maximum) [Rust](src/main/rust/g0201_0300/s0239_sliding_window_maximum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Heap_Priority_Queue, Sliding_Window, Queue, Monotonic_Queue, Big_O_Time_O(n\*k)_Space_O(n+k) | 216 | 99.50 #### Udemy Two Pointers | | | | | | | |-|-|-|-|-|-|- -| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 -| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 +| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water) [Rust](src/main/rust/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 +| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum) [Rust](src/main/rust/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 #### Udemy Famous Algorithm | | | | | | | |-|-|-|-|-|-|- -| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 -| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 +| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray) [Rust](src/main/rust/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 +| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element) [Rust](src/main/rust/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 #### Udemy Sorting Algorithms @@ -212,87 +89,87 @@ | | | | | | | |-|-|-|-|-|-|- -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 -| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 -| 0073 |Set Matrix Zeroes| [Java](src/main/java/g0001_0100/s0073_set_matrix_zeroes) [Kotlin](src/main/kotlin/g0001_0100/s0073_set_matrix_zeroes) [TypeScript](src/main/ts/g0001_0100/s0073_set_matrix_zeroes) [Scala](src/main/scala/g0001_0100/s0073_set_matrix_zeroes) [Ruby](src/main/ruby/g0001_0100/s0073_set_matrix_zeroes) [PHP](src/main/php/g0001_0100/s0073_set_matrix_zeroes) [C#](src/main/csharp/g0001_0100/s0073_set_matrix_zeroes) [Go](src/main/go/g0001_0100/s0073_set_matrix_zeroes) [Cpp](src/main/cpp/g0001_0100/s0073_set_matrix_zeroes) [Python](src/main/python/g0001_0100/s0073_set_matrix_zeroes) [Swift](src/main/swift/g0001_0100/s0073_set_matrix_zeroes) [Elixir](src/main/elixir/g0001_0100/s0073_set_matrix_zeroes)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Matrix, Big_O_Time_O(m\*n)_Space_O(1) | 61 | 97.66 -| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image) [Rust](src/main/rust/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 +| 0073 |Set Matrix Zeroes| [Java](src/main/java/g0001_0100/s0073_set_matrix_zeroes) [Kotlin](src/main/kotlin/g0001_0100/s0073_set_matrix_zeroes) [TypeScript](src/main/ts/g0001_0100/s0073_set_matrix_zeroes) [Scala](src/main/scala/g0001_0100/s0073_set_matrix_zeroes) [Ruby](src/main/ruby/g0001_0100/s0073_set_matrix_zeroes) [PHP](src/main/php/g0001_0100/s0073_set_matrix_zeroes) [C#](src/main/csharp/g0001_0100/s0073_set_matrix_zeroes) [Go](src/main/go/g0001_0100/s0073_set_matrix_zeroes) [Cpp](src/main/cpp/g0001_0100/s0073_set_matrix_zeroes) [Python](src/main/python/g0001_0100/s0073_set_matrix_zeroes) [Swift](src/main/swift/g0001_0100/s0073_set_matrix_zeroes) [Elixir](src/main/elixir/g0001_0100/s0073_set_matrix_zeroes) [Rust](src/main/rust/g0001_0100/s0073_set_matrix_zeroes)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Matrix, Big_O_Time_O(m\*n)_Space_O(1) | 61 | 97.66 +| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals) [Rust](src/main/rust/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 #### Udemy Linked List | | | | | | | |-|-|-|-|-|-|- -| 0114 |Flatten Binary Tree to Linked List| [Java](src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Kotlin](src/main/kotlin/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [TypeScript](src/main/ts/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Scala](src/main/scala/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Ruby](src/main/ruby/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [PHP](src/main/php/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [C#](src/main/csharp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Go](src/main/go/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Cpp](src/main/cpp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Python](src/main/python/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Swift](src/main/swift/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Elixir](src/main/elixir/g0101_0200/s0114_flatten_binary_tree_to_linked_list)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Linked_List, Big_O_Time_O(N)_Space_O(N) | 55 | 90.66 -| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 -| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 -| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 -| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/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) | 51 | 92.87 -| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/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) | 59 | 86.77 -| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 -| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 -| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 -| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 -| 0146 |LRU Cache| [Java](src/main/java/g0101_0200/s0146_lru_cache) [Kotlin](src/main/kotlin/g0101_0200/s0146_lru_cache) [TypeScript](src/main/ts/g0101_0200/s0146_lru_cache) [Scala](src/main/scala/g0101_0200/s0146_lru_cache) [Ruby](src/main/ruby/g0101_0200/s0146_lru_cache) [PHP](src/main/php/g0101_0200/s0146_lru_cache) [C#](src/main/csharp/g0101_0200/s0146_lru_cache) [Go](src/main/go/g0101_0200/s0146_lru_cache) [Cpp](src/main/cpp/g0101_0200/s0146_lru_cache) [Python](src/main/python/g0101_0200/s0146_lru_cache) [Swift](src/main/swift/g0101_0200/s0146_lru_cache) [Elixir](src/main/elixir/g0101_0200/s0146_lru_cache)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Design, Linked_List, Doubly_Linked_List, Big_O_Time_O(1)_Space_O(capacity) | 473 | 94.72 +| 0114 |Flatten Binary Tree to Linked List| [Java](src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Kotlin](src/main/kotlin/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [TypeScript](src/main/ts/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Scala](src/main/scala/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Ruby](src/main/ruby/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [PHP](src/main/php/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [C#](src/main/csharp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Go](src/main/go/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Cpp](src/main/cpp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Python](src/main/python/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Swift](src/main/swift/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Elixir](src/main/elixir/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Rust](src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Linked_List, Big_O_Time_O(N)_Space_O(N) | 55 | 90.66 +| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs) [Rust](src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 +| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii) [Rust](src/main/rust/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 +| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle) [Rust](src/main/rust/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 +| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list) [Rust](src/main/rust/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) | 51 | 92.87 +| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists) [Rust](src/main/rust/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) | 59 | 86.77 +| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists) [Rust](src/main/rust/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 +| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list) [Rust](src/main/rust/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 +| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer) [Rust](src/main/rust/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 +| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group) [Rust](src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 +| 0146 |LRU Cache| [Java](src/main/java/g0101_0200/s0146_lru_cache) [Kotlin](src/main/kotlin/g0101_0200/s0146_lru_cache) [TypeScript](src/main/ts/g0101_0200/s0146_lru_cache) [Scala](src/main/scala/g0101_0200/s0146_lru_cache) [Ruby](src/main/ruby/g0101_0200/s0146_lru_cache) [PHP](src/main/php/g0101_0200/s0146_lru_cache) [C#](src/main/csharp/g0101_0200/s0146_lru_cache) [Go](src/main/go/g0101_0200/s0146_lru_cache) [Cpp](src/main/cpp/g0101_0200/s0146_lru_cache) [Python](src/main/python/g0101_0200/s0146_lru_cache) [Swift](src/main/swift/g0101_0200/s0146_lru_cache) [Elixir](src/main/elixir/g0101_0200/s0146_lru_cache) [Rust](src/main/rust/g0101_0200/s0146_lru_cache)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Design, Linked_List, Doubly_Linked_List, Big_O_Time_O(1)_Space_O(capacity) | 473 | 94.72 #### Udemy Tree Stack Queue | | | | | | | |-|-|-|-|-|-|- -| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 -| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 -| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 -| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 -| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 -| 0124 |Binary Tree Maximum Path Sum| [Java](src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum) [Kotlin](src/main/kotlin/g0101_0200/s0124_binary_tree_maximum_path_sum) [TypeScript](src/main/ts/g0101_0200/s0124_binary_tree_maximum_path_sum) [Scala](src/main/scala/g0101_0200/s0124_binary_tree_maximum_path_sum) [Ruby](src/main/ruby/g0101_0200/s0124_binary_tree_maximum_path_sum) [PHP](src/main/php/g0101_0200/s0124_binary_tree_maximum_path_sum) [C#](src/main/csharp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Go](src/main/go/g0101_0200/s0124_binary_tree_maximum_path_sum) [Cpp](src/main/cpp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Python](src/main/python/g0101_0200/s0124_binary_tree_maximum_path_sum) [Swift](src/main/swift/g0101_0200/s0124_binary_tree_maximum_path_sum) [Elixir](src/main/elixir/g0101_0200/s0124_binary_tree_maximum_path_sum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 61 | 96.73 -| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 -| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 +| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal) [Rust](src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 +| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal) [Rust](src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 +| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree) [Rust](src/main/rust/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 +| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree) [Rust](src/main/rust/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 +| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree) [Rust](src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 +| 0124 |Binary Tree Maximum Path Sum| [Java](src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum) [Kotlin](src/main/kotlin/g0101_0200/s0124_binary_tree_maximum_path_sum) [TypeScript](src/main/ts/g0101_0200/s0124_binary_tree_maximum_path_sum) [Scala](src/main/scala/g0101_0200/s0124_binary_tree_maximum_path_sum) [Ruby](src/main/ruby/g0101_0200/s0124_binary_tree_maximum_path_sum) [PHP](src/main/php/g0101_0200/s0124_binary_tree_maximum_path_sum) [C#](src/main/csharp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Go](src/main/go/g0101_0200/s0124_binary_tree_maximum_path_sum) [Cpp](src/main/cpp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Python](src/main/python/g0101_0200/s0124_binary_tree_maximum_path_sum) [Swift](src/main/swift/g0101_0200/s0124_binary_tree_maximum_path_sum) [Elixir](src/main/elixir/g0101_0200/s0124_binary_tree_maximum_path_sum) [Rust](src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 61 | 96.73 +| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree) [Rust](src/main/rust/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 +| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Rust](src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 #### Udemy Trie and Heap | | | | | | | |-|-|-|-|-|-|- -| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 +| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree) [Rust](src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 #### Udemy Graph | | | | | | | |-|-|-|-|-|-|- -| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 +| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands) [Rust](src/main/rust/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 #### Udemy Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 -| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 -| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 -| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/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) | 44 | 94.58 -| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 -| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 -| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 -| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 -| 0010 |Regular Expression Matching| [Java](src/main/java/g0001_0100/s0010_regular_expression_matching) [Kotlin](src/main/kotlin/g0001_0100/s0010_regular_expression_matching) [TypeScript](src/main/ts/g0001_0100/s0010_regular_expression_matching) [Scala](src/main/scala/g0001_0100/s0010_regular_expression_matching) [Ruby](src/main/ruby/g0001_0100/s0010_regular_expression_matching) [PHP](src/main/php/g0001_0100/s0010_regular_expression_matching) [C#](src/main/csharp/g0001_0100/s0010_regular_expression_matching) [Go](src/main/go/g0001_0100/s0010_regular_expression_matching) [Cpp](src/main/cpp/g0001_0100/s0010_regular_expression_matching) [Python](src/main/python/g0001_0100/s0010_regular_expression_matching) [Swift](src/main/swift/g0001_0100/s0010_regular_expression_matching) [Elixir](src/main/elixir/g0001_0100/s0010_regular_expression_matching)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Recursion, Big_O_Time_O(m\*n)_Space_O(m\*n) | 69 | 92.65 +| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break) [Rust](src/main/rust/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 +| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray) [Rust](src/main/rust/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 +| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber) [Rust](src/main/rust/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 +| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs) [Rust](src/main/rust/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) | 44 | 94.58 +| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum) [Rust](src/main/rust/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 +| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence) [Rust](src/main/rust/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 +| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence) [Rust](src/main/rust/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 +| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance) [Rust](src/main/rust/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 +| 0010 |Regular Expression Matching| [Java](src/main/java/g0001_0100/s0010_regular_expression_matching) [Kotlin](src/main/kotlin/g0001_0100/s0010_regular_expression_matching) [TypeScript](src/main/ts/g0001_0100/s0010_regular_expression_matching) [Scala](src/main/scala/g0001_0100/s0010_regular_expression_matching) [Ruby](src/main/ruby/g0001_0100/s0010_regular_expression_matching) [PHP](src/main/php/g0001_0100/s0010_regular_expression_matching) [C#](src/main/csharp/g0001_0100/s0010_regular_expression_matching) [Go](src/main/go/g0001_0100/s0010_regular_expression_matching) [Cpp](src/main/cpp/g0001_0100/s0010_regular_expression_matching) [Python](src/main/python/g0001_0100/s0010_regular_expression_matching) [Swift](src/main/swift/g0001_0100/s0010_regular_expression_matching) [Elixir](src/main/elixir/g0001_0100/s0010_regular_expression_matching) [Rust](src/main/rust/g0001_0100/s0010_regular_expression_matching)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Recursion, Big_O_Time_O(m\*n)_Space_O(m\*n) | 69 | 92.65 #### Udemy Backtracking/Recursion | | | | | | | |-|-|-|-|-|-|- -| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 -| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 -| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 -| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 -| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 +| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses) [Rust](src/main/rust/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 +| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum) [Rust](src/main/rust/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 +| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets) [Rust](src/main/rust/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 +| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Rust](src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 +| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations) [Rust](src/main/rust/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 #### Udemy Bit Manipulation | | | | | | | |-|-|-|-|-|-|- -| 0338 |Counting Bits| [Java](src/main/java/g0301_0400/s0338_counting_bits) [Kotlin](src/main/kotlin/g0301_0400/s0338_counting_bits) [TypeScript](src/main/ts/g0301_0400/s0338_counting_bits) [Scala](src/main/scala/g0301_0400/s0338_counting_bits) [Ruby](src/main/ruby/g0301_0400/s0338_counting_bits) [PHP](src/main/php/g0301_0400/s0338_counting_bits) [C#](src/main/csharp/g0301_0400/s0338_counting_bits) [Go](src/main/go/g0301_0400/s0338_counting_bits) [Cpp](src/main/cpp/g0301_0400/s0338_counting_bits) [Python](src/main/python/g0301_0400/s0338_counting_bits) [Swift](src/main/swift/g0301_0400/s0338_counting_bits) [Elixir](src/main/elixir/g0301_0400/s0338_counting_bits)| Easy | Top_100_Liked_Questions, Dynamic_Programming, Bit_Manipulation, Big_O_Time_O(num)_Space_O(num) | 69 | 86.81 +| 0338 |Counting Bits| [Java](src/main/java/g0301_0400/s0338_counting_bits) [Kotlin](src/main/kotlin/g0301_0400/s0338_counting_bits) [TypeScript](src/main/ts/g0301_0400/s0338_counting_bits) [Scala](src/main/scala/g0301_0400/s0338_counting_bits) [Ruby](src/main/ruby/g0301_0400/s0338_counting_bits) [PHP](src/main/php/g0301_0400/s0338_counting_bits) [C#](src/main/csharp/g0301_0400/s0338_counting_bits) [Go](src/main/go/g0301_0400/s0338_counting_bits) [Cpp](src/main/cpp/g0301_0400/s0338_counting_bits) [Python](src/main/python/g0301_0400/s0338_counting_bits) [Swift](src/main/swift/g0301_0400/s0338_counting_bits) [Elixir](src/main/elixir/g0301_0400/s0338_counting_bits) [Rust](src/main/rust/g0301_0400/s0338_counting_bits)| Easy | Top_100_Liked_Questions, Dynamic_Programming, Bit_Manipulation, Big_O_Time_O(num)_Space_O(num) | 69 | 86.81 #### Udemy Design | | | | | | | |-|-|-|-|-|-|- -| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 +| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack) [Rust](src/main/rust/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 ### Data Structure I @@ -300,19 +177,19 @@ | | | | | | | |-|-|-|-|-|-|- -| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 +| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray) [Rust](src/main/rust/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 #### Day 2 Array | | | | | | | |-|-|-|-|-|-|- -| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 +| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum) [Rust](src/main/rust/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 #### Day 3 Array | | | | | | | |-|-|-|-|-|-|- -| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 +| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Rust](src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 #### Day 4 Array @@ -323,7 +200,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 #### Day 6 String @@ -334,40 +211,40 @@ | | | | | | | |-|-|-|-|-|-|- -| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 -| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/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) | 59 | 86.77 +| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle) [Rust](src/main/rust/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 +| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists) [Rust](src/main/rust/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) | 59 | 86.77 #### Day 8 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/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) | 51 | 92.87 +| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list) [Rust](src/main/rust/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) | 51 | 92.87 #### Day 9 Stack Queue | | | | | | | |-|-|-|-|-|-|- -| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 +| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses) [Rust](src/main/rust/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 #### Day 10 Tree | | | | | | | |-|-|-|-|-|-|- -| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 +| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal) [Rust](src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 #### Day 11 Tree | | | | | | | |-|-|-|-|-|-|- -| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 -| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 -| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 +| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal) [Rust](src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 +| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree) [Rust](src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 +| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree) [Rust](src/main/rust/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 #### Day 12 Tree | | | | | | | |-|-|-|-|-|-|- -| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 +| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree) [Rust](src/main/rust/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 #### Day 13 Tree @@ -378,7 +255,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 +| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree) [Rust](src/main/rust/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 ### Data Structure II @@ -386,35 +263,35 @@ | | | | | | | |-|-|-|-|-|-|- -| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 -| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 -| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 +| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number) [Rust](src/main/rust/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 +| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element) [Rust](src/main/rust/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 +| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum) [Rust](src/main/rust/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 #### Day 2 Array | | | | | | | |-|-|-|-|-|-|- -| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 -| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 +| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors) [Rust](src/main/rust/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 +| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals) [Rust](src/main/rust/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 #### Day 3 Array | | | | | | | |-|-|-|-|-|-|- -| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 +| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image) [Rust](src/main/rust/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 #### Day 4 Array | | | | | | | |-|-|-|-|-|-|- -| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 +| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii) [Rust](src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 #### Day 5 Array | | | | | | | |-|-|-|-|-|-|- -| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 -| 0560 |Subarray Sum Equals K| [Java](src/main/java/g0501_0600/s0560_subarray_sum_equals_k) [Kotlin](src/main/kotlin/g0501_0600/s0560_subarray_sum_equals_k) [TypeScript](src/main/ts/g0501_0600/s0560_subarray_sum_equals_k) [Scala](src/main/scala/g0501_0600/s0560_subarray_sum_equals_k) [Ruby](src/main/ruby/g0501_0600/s0560_subarray_sum_equals_k) [PHP](src/main/php/g0501_0600/s0560_subarray_sum_equals_k) [C#](src/main/csharp/g0501_0600/s0560_subarray_sum_equals_k) [Go](src/main/go/g0501_0600/s0560_subarray_sum_equals_k) [Cpp](src/main/cpp/g0501_0600/s0560_subarray_sum_equals_k) [Python](src/main/python/g0501_0600/s0560_subarray_sum_equals_k) [Swift](src/main/swift/g0501_0600/s0560_subarray_sum_equals_k) [Elixir](src/main/elixir/g0501_0600/s0560_subarray_sum_equals_k)| Medium | Top_100_Liked_Questions, Array, Hash_Table, Prefix_Sum, Big_O_Time_O(n)_Space_O(n) | 70 | 92.45 +| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self) [Rust](src/main/rust/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 +| 0560 |Subarray Sum Equals K| [Java](src/main/java/g0501_0600/s0560_subarray_sum_equals_k) [Kotlin](src/main/kotlin/g0501_0600/s0560_subarray_sum_equals_k) [TypeScript](src/main/ts/g0501_0600/s0560_subarray_sum_equals_k) [Scala](src/main/scala/g0501_0600/s0560_subarray_sum_equals_k) [Ruby](src/main/ruby/g0501_0600/s0560_subarray_sum_equals_k) [PHP](src/main/php/g0501_0600/s0560_subarray_sum_equals_k) [C#](src/main/csharp/g0501_0600/s0560_subarray_sum_equals_k) [Go](src/main/go/g0501_0600/s0560_subarray_sum_equals_k) [Cpp](src/main/cpp/g0501_0600/s0560_subarray_sum_equals_k) [Python](src/main/python/g0501_0600/s0560_subarray_sum_equals_k) [Swift](src/main/swift/g0501_0600/s0560_subarray_sum_equals_k) [Elixir](src/main/elixir/g0501_0600/s0560_subarray_sum_equals_k) [Rust](src/main/rust/g0501_0600/s0560_subarray_sum_equals_k)| Medium | Top_100_Liked_Questions, Array, Hash_Table, Prefix_Sum, Big_O_Time_O(n)_Space_O(n) | 70 | 92.45 #### Day 6 String @@ -425,56 +302,56 @@ | | | | | | | |-|-|-|-|-|-|- -| 0763 |Partition Labels| [Java](src/main/java/g0701_0800/s0763_partition_labels) [Kotlin](src/main/kotlin/g0701_0800/s0763_partition_labels) [TypeScript](src/main/ts/g0701_0800/s0763_partition_labels) [Scala](src/main/scala/g0701_0800/s0763_partition_labels) [Ruby](src/main/ruby/g0701_0800/s0763_partition_labels) [PHP](src/main/php/g0701_0800/s0763_partition_labels) [C#](src/main/csharp/g0701_0800/s0763_partition_labels) [Go](src/main/go/g0701_0800/s0763_partition_labels) [Cpp](src/main/cpp/g0701_0800/s0763_partition_labels) [Python](src/main/python/g0701_0800/s0763_partition_labels) [Swift](src/main/swift/g0701_0800/s0763_partition_labels) [Elixir](src/main/elixir/g0701_0800/s0763_partition_labels)| Medium | Top_100_Liked_Questions, String, Hash_Table, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 54 | 94.74 +| 0763 |Partition Labels| [Java](src/main/java/g0701_0800/s0763_partition_labels) [Kotlin](src/main/kotlin/g0701_0800/s0763_partition_labels) [TypeScript](src/main/ts/g0701_0800/s0763_partition_labels) [Scala](src/main/scala/g0701_0800/s0763_partition_labels) [Ruby](src/main/ruby/g0701_0800/s0763_partition_labels) [PHP](src/main/php/g0701_0800/s0763_partition_labels) [C#](src/main/csharp/g0701_0800/s0763_partition_labels) [Go](src/main/go/g0701_0800/s0763_partition_labels) [Cpp](src/main/cpp/g0701_0800/s0763_partition_labels) [Python](src/main/python/g0701_0800/s0763_partition_labels) [Swift](src/main/swift/g0701_0800/s0763_partition_labels) [Elixir](src/main/elixir/g0701_0800/s0763_partition_labels) [Rust](src/main/rust/g0701_0800/s0763_partition_labels)| Medium | Top_100_Liked_Questions, String, Hash_Table, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 54 | 94.74 #### Day 8 String | | | | | | | |-|-|-|-|-|-|- -| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 +| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams) [Rust](src/main/rust/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 #### Day 9 String | | | | | | | |-|-|-|-|-|-|- -| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 +| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring) [Rust](src/main/rust/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 #### Day 10 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 -| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 +| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers) [Rust](src/main/rust/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 +| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii) [Rust](src/main/rust/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 #### Day 11 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 +| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists) [Rust](src/main/rust/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 #### Day 12 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 +| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs) [Rust](src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 #### Day 13 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 +| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group) [Rust](src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 #### Day 14 Stack Queue | | | | | | | |-|-|-|-|-|-|- -| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 +| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack) [Rust](src/main/rust/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 #### Day 15 Tree | | | | | | | |-|-|-|-|-|-|- -| 0105 |Construct Binary Tree from Preorder and Inorder Traversal| [Java](src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [TypeScript](src/main/ts/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Scala](src/main/scala/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Ruby](src/main/ruby/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [PHP](src/main/php/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [C#](src/main/csharp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Go](src/main/go/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Cpp](src/main/cpp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Python](src/main/python/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Swift](src/main/swift/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Elixir](src/main/elixir/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal)| 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) | 65 | 96.47 +| 0105 |Construct Binary Tree from Preorder and Inorder Traversal| [Java](src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [TypeScript](src/main/ts/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Scala](src/main/scala/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Ruby](src/main/ruby/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [PHP](src/main/php/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [C#](src/main/csharp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Go](src/main/go/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Cpp](src/main/cpp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Python](src/main/python/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Swift](src/main/swift/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Elixir](src/main/elixir/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Rust](src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal)| 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) | 65 | 96.47 #### Day 16 Tree @@ -485,13 +362,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 +| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Rust](src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 #### Day 18 Tree | | | | | | | |-|-|-|-|-|-|- -| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 +| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Rust](src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 #### Day 19 Graph @@ -502,8 +379,8 @@ | | | | | | | |-|-|-|-|-|-|- -| 0215 |Kth Largest Element in an Array| [Java](src/main/java/g0201_0300/s0215_kth_largest_element_in_an_array) [Kotlin](src/main/kotlin/g0201_0300/s0215_kth_largest_element_in_an_array) [TypeScript](src/main/ts/g0201_0300/s0215_kth_largest_element_in_an_array) [Scala](src/main/scala/g0201_0300/s0215_kth_largest_element_in_an_array) [Ruby](src/main/ruby/g0201_0300/s0215_kth_largest_element_in_an_array) [PHP](src/main/php/g0201_0300/s0215_kth_largest_element_in_an_array) [C#](src/main/csharp/g0201_0300/s0215_kth_largest_element_in_an_array) [Go](src/main/go/g0201_0300/s0215_kth_largest_element_in_an_array) [Cpp](src/main/cpp/g0201_0300/s0215_kth_largest_element_in_an_array) [Python](src/main/python/g0201_0300/s0215_kth_largest_element_in_an_array) [Swift](src/main/swift/g0201_0300/s0215_kth_largest_element_in_an_array) [Elixir](src/main/elixir/g0201_0300/s0215_kth_largest_element_in_an_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Quickselect, Big_O_Time_O(n\*log(n))_Space_O(log(n)) | 148 | 54.45 -| 0347 |Top K Frequent Elements| [Java](src/main/java/g0301_0400/s0347_top_k_frequent_elements) [Kotlin](src/main/kotlin/g0301_0400/s0347_top_k_frequent_elements) [TypeScript](src/main/ts/g0301_0400/s0347_top_k_frequent_elements) [Scala](src/main/scala/g0301_0400/s0347_top_k_frequent_elements) [Ruby](src/main/ruby/g0301_0400/s0347_top_k_frequent_elements) [PHP](src/main/php/g0301_0400/s0347_top_k_frequent_elements) [C#](src/main/csharp/g0301_0400/s0347_top_k_frequent_elements) [Go](src/main/go/g0301_0400/s0347_top_k_frequent_elements) [Cpp](src/main/cpp/g0301_0400/s0347_top_k_frequent_elements) [Python](src/main/python/g0301_0400/s0347_top_k_frequent_elements) [Swift](src/main/swift/g0301_0400/s0347_top_k_frequent_elements) [Elixir](src/main/elixir/g0301_0400/s0347_top_k_frequent_elements)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Divide_and_Conquer, Quickselect, Bucket_Sort, Big_O_Time_O(n\*log(n))_Space_O(k) | 62 | 87.48 +| 0215 |Kth Largest Element in an Array| [Java](src/main/java/g0201_0300/s0215_kth_largest_element_in_an_array) [Kotlin](src/main/kotlin/g0201_0300/s0215_kth_largest_element_in_an_array) [TypeScript](src/main/ts/g0201_0300/s0215_kth_largest_element_in_an_array) [Scala](src/main/scala/g0201_0300/s0215_kth_largest_element_in_an_array) [Ruby](src/main/ruby/g0201_0300/s0215_kth_largest_element_in_an_array) [PHP](src/main/php/g0201_0300/s0215_kth_largest_element_in_an_array) [C#](src/main/csharp/g0201_0300/s0215_kth_largest_element_in_an_array) [Go](src/main/go/g0201_0300/s0215_kth_largest_element_in_an_array) [Cpp](src/main/cpp/g0201_0300/s0215_kth_largest_element_in_an_array) [Python](src/main/python/g0201_0300/s0215_kth_largest_element_in_an_array) [Swift](src/main/swift/g0201_0300/s0215_kth_largest_element_in_an_array) [Elixir](src/main/elixir/g0201_0300/s0215_kth_largest_element_in_an_array) [Rust](src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Quickselect, Big_O_Time_O(n\*log(n))_Space_O(log(n)) | 148 | 54.45 +| 0347 |Top K Frequent Elements| [Java](src/main/java/g0301_0400/s0347_top_k_frequent_elements) [Kotlin](src/main/kotlin/g0301_0400/s0347_top_k_frequent_elements) [TypeScript](src/main/ts/g0301_0400/s0347_top_k_frequent_elements) [Scala](src/main/scala/g0301_0400/s0347_top_k_frequent_elements) [Ruby](src/main/ruby/g0301_0400/s0347_top_k_frequent_elements) [PHP](src/main/php/g0301_0400/s0347_top_k_frequent_elements) [C#](src/main/csharp/g0301_0400/s0347_top_k_frequent_elements) [Go](src/main/go/g0301_0400/s0347_top_k_frequent_elements) [Cpp](src/main/cpp/g0301_0400/s0347_top_k_frequent_elements) [Python](src/main/python/g0301_0400/s0347_top_k_frequent_elements) [Swift](src/main/swift/g0301_0400/s0347_top_k_frequent_elements) [Elixir](src/main/elixir/g0301_0400/s0347_top_k_frequent_elements) [Rust](src/main/rust/g0301_0400/s0347_top_k_frequent_elements)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Divide_and_Conquer, Quickselect, Bucket_Sort, Big_O_Time_O(n\*log(n))_Space_O(k) | 62 | 87.48 #### Day 21 Heap Priority Queue @@ -516,19 +393,19 @@ | | | | | | | |-|-|-|-|-|-|- -| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 +| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position) [Rust](src/main/rust/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 #### Day 2 Two Pointers | | | | | | | |-|-|-|-|-|-|- -| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/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) | 75 | 97.25 +| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/g0101_0200/s0189_rotate_array) [Rust](src/main/rust/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) | 75 | 97.25 #### Day 3 Two Pointers | | | | | | | |-|-|-|-|-|-|- -| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 +| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes) [Rust](src/main/rust/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 #### Day 4 Two Pointers @@ -539,13 +416,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/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) | 54 | 87.87 +| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Rust](src/main/rust/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) | 54 | 87.87 #### Day 6 Sliding Window | | | | | | | |-|-|-|-|-|-|- -| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/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) | 65 | 90.77 +| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/g0001_0100/s0003_longest_substring_without_repeating_characters) [Rust](src/main/rust/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) | 65 | 90.77 #### Day 7 Breadth First Search Depth First Search @@ -566,21 +443,21 @@ | | | | | | | |-|-|-|-|-|-|- -| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/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) | 59 | 86.77 -| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/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) | 51 | 92.87 +| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists) [Rust](src/main/rust/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) | 59 | 86.77 +| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list) [Rust](src/main/rust/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) | 51 | 92.87 #### Day 11 Recursion Backtracking | | | | | | | |-|-|-|-|-|-|- -| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 +| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations) [Rust](src/main/rust/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 #### Day 12 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/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) | 44 | 94.58 -| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 +| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs) [Rust](src/main/rust/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) | 44 | 94.58 +| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber) [Rust](src/main/rust/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 #### Day 13 Bit Manipulation @@ -591,7 +468,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 +| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number) [Rust](src/main/rust/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 ### Algorithm II @@ -599,39 +476,39 @@ | | | | | | | |-|-|-|-|-|-|- -| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 -| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Rust](src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 +| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array) [Rust](src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 #### Day 2 Binary Search | | | | | | | |-|-|-|-|-|-|- -| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 +| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Rust](src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 #### Day 3 Two Pointers | | | | | | | |-|-|-|-|-|-|- -| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 +| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum) [Rust](src/main/rust/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 #### Day 4 Two Pointers | | | | | | | |-|-|-|-|-|-|- -| 0011 |Container With Most Water| [Java](src/main/java/g0001_0100/s0011_container_with_most_water) [Kotlin](src/main/kotlin/g0001_0100/s0011_container_with_most_water) [TypeScript](src/main/ts/g0001_0100/s0011_container_with_most_water) [Scala](src/main/scala/g0001_0100/s0011_container_with_most_water) [Ruby](src/main/ruby/g0001_0100/s0011_container_with_most_water) [PHP](src/main/php/g0001_0100/s0011_container_with_most_water) [C#](src/main/csharp/g0001_0100/s0011_container_with_most_water) [Go](src/main/go/g0001_0100/s0011_container_with_most_water) [Cpp](src/main/cpp/g0001_0100/s0011_container_with_most_water) [Python](src/main/python/g0001_0100/s0011_container_with_most_water) [Swift](src/main/swift/g0001_0100/s0011_container_with_most_water) [Elixir](src/main/elixir/g0001_0100/s0011_container_with_most_water)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 57 | 98.23 +| 0011 |Container With Most Water| [Java](src/main/java/g0001_0100/s0011_container_with_most_water) [Kotlin](src/main/kotlin/g0001_0100/s0011_container_with_most_water) [TypeScript](src/main/ts/g0001_0100/s0011_container_with_most_water) [Scala](src/main/scala/g0001_0100/s0011_container_with_most_water) [Ruby](src/main/ruby/g0001_0100/s0011_container_with_most_water) [PHP](src/main/php/g0001_0100/s0011_container_with_most_water) [C#](src/main/csharp/g0001_0100/s0011_container_with_most_water) [Go](src/main/go/g0001_0100/s0011_container_with_most_water) [Cpp](src/main/cpp/g0001_0100/s0011_container_with_most_water) [Python](src/main/python/g0001_0100/s0011_container_with_most_water) [Swift](src/main/swift/g0001_0100/s0011_container_with_most_water) [Elixir](src/main/elixir/g0001_0100/s0011_container_with_most_water) [Rust](src/main/rust/g0001_0100/s0011_container_with_most_water)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 57 | 98.23 #### Day 5 Sliding Window | | | | | | | |-|-|-|-|-|-|- -| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 +| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string) [Rust](src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 #### Day 6 Breadth First Search Depth First Search | | | | | | | |-|-|-|-|-|-|- -| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 +| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands) [Rust](src/main/rust/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 #### Day 7 Breadth First Search Depth First Search @@ -647,65 +524,65 @@ | | | | | | | |-|-|-|-|-|-|- -| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 +| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets) [Rust](src/main/rust/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 #### Day 10 Recursion Backtracking | | | | | | | |-|-|-|-|-|-|- -| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 +| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum) [Rust](src/main/rust/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 #### Day 11 Recursion Backtracking | | | | | | | |-|-|-|-|-|-|- -| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 -| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 -| 0079 |Word Search| [Java](src/main/java/g0001_0100/s0079_word_search) [Kotlin](src/main/kotlin/g0001_0100/s0079_word_search) [TypeScript](src/main/ts/g0001_0100/s0079_word_search) [Scala](src/main/scala/g0001_0100/s0079_word_search) [Ruby](src/main/ruby/g0001_0100/s0079_word_search) [PHP](src/main/php/g0001_0100/s0079_word_search) [C#](src/main/csharp/g0001_0100/s0079_word_search) [Go](src/main/go/g0001_0100/s0079_word_search) [Cpp](src/main/cpp/g0001_0100/s0079_word_search) [Python](src/main/python/g0001_0100/s0079_word_search) [Swift](src/main/swift/g0001_0100/s0079_word_search) [Elixir](src/main/elixir/g0001_0100/s0079_word_search)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Matrix, Backtracking, Big_O_Time_O(4^(m\*n))_Space_O(m\*n) | 327 | 95.78 +| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Rust](src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 +| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses) [Rust](src/main/rust/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 +| 0079 |Word Search| [Java](src/main/java/g0001_0100/s0079_word_search) [Kotlin](src/main/kotlin/g0001_0100/s0079_word_search) [TypeScript](src/main/ts/g0001_0100/s0079_word_search) [Scala](src/main/scala/g0001_0100/s0079_word_search) [Ruby](src/main/ruby/g0001_0100/s0079_word_search) [PHP](src/main/php/g0001_0100/s0079_word_search) [C#](src/main/csharp/g0001_0100/s0079_word_search) [Go](src/main/go/g0001_0100/s0079_word_search) [Cpp](src/main/cpp/g0001_0100/s0079_word_search) [Python](src/main/python/g0001_0100/s0079_word_search) [Swift](src/main/swift/g0001_0100/s0079_word_search) [Elixir](src/main/elixir/g0001_0100/s0079_word_search) [Rust](src/main/rust/g0001_0100/s0079_word_search)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Matrix, Backtracking, Big_O_Time_O(4^(m\*n))_Space_O(m\*n) | 327 | 95.78 #### Day 12 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 +| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game) [Rust](src/main/rust/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 #### Day 13 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 -| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 +| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii) [Rust](src/main/rust/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 +| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths) [Rust](src/main/rust/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 #### Day 14 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 +| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring) [Rust](src/main/rust/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 #### Day 15 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 +| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break) [Rust](src/main/rust/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 #### Day 16 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 +| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence) [Rust](src/main/rust/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 #### Day 17 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 +| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence) [Rust](src/main/rust/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 #### Day 18 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 -| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 +| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance) [Rust](src/main/rust/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 +| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change) [Rust](src/main/rust/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 #### Day 19 Bit Manipulation @@ -733,7 +610,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 +| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position) [Rust](src/main/rust/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 #### Day 3 @@ -749,7 +626,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 +| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Rust](src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 #### Day 6 @@ -765,7 +642,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 #### Day 9 @@ -781,13 +658,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 +| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array) [Rust](src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 #### Day 12 | | | | | | | |-|-|-|-|-|-|- -| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 +| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Rust](src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 ### Binary Search II @@ -805,7 +682,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 +| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence) [Rust](src/main/rust/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 #### Day 4 @@ -816,7 +693,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0287 |Find the Duplicate Number| [Java](src/main/java/g0201_0300/s0287_find_the_duplicate_number) [Kotlin](src/main/kotlin/g0201_0300/s0287_find_the_duplicate_number) [TypeScript](src/main/ts/g0201_0300/s0287_find_the_duplicate_number) [Scala](src/main/scala/g0201_0300/s0287_find_the_duplicate_number) [Ruby](src/main/ruby/g0201_0300/s0287_find_the_duplicate_number) [PHP](src/main/php/g0201_0300/s0287_find_the_duplicate_number) [C#](src/main/csharp/g0201_0300/s0287_find_the_duplicate_number) [Go](src/main/go/g0201_0300/s0287_find_the_duplicate_number) [Cpp](src/main/cpp/g0201_0300/s0287_find_the_duplicate_number) [Python](src/main/python/g0201_0300/s0287_find_the_duplicate_number) [Swift](src/main/swift/g0201_0300/s0287_find_the_duplicate_number) [Elixir](src/main/elixir/g0201_0300/s0287_find_the_duplicate_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Two_Pointers, Bit_Manipulation, Big_O_Time_O(n)_Space_O(n) | 60 | 98.11 +| 0287 |Find the Duplicate Number| [Java](src/main/java/g0201_0300/s0287_find_the_duplicate_number) [Kotlin](src/main/kotlin/g0201_0300/s0287_find_the_duplicate_number) [TypeScript](src/main/ts/g0201_0300/s0287_find_the_duplicate_number) [Scala](src/main/scala/g0201_0300/s0287_find_the_duplicate_number) [Ruby](src/main/ruby/g0201_0300/s0287_find_the_duplicate_number) [PHP](src/main/php/g0201_0300/s0287_find_the_duplicate_number) [C#](src/main/csharp/g0201_0300/s0287_find_the_duplicate_number) [Go](src/main/go/g0201_0300/s0287_find_the_duplicate_number) [Cpp](src/main/cpp/g0201_0300/s0287_find_the_duplicate_number) [Python](src/main/python/g0201_0300/s0287_find_the_duplicate_number) [Swift](src/main/swift/g0201_0300/s0287_find_the_duplicate_number) [Elixir](src/main/elixir/g0201_0300/s0287_find_the_duplicate_number) [Rust](src/main/rust/g0201_0300/s0287_find_the_duplicate_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Two_Pointers, Bit_Manipulation, Big_O_Time_O(n)_Space_O(n) | 60 | 98.11 #### Day 6 @@ -832,7 +709,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 +| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii) [Rust](src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 #### Day 9 @@ -905,38 +782,38 @@ | | | | | | | |-|-|-|-|-|-|- -| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/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) | 44 | 94.58 +| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs) [Rust](src/main/rust/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) | 44 | 94.58 #### Day 3 | | | | | | | |-|-|-|-|-|-|- -| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 +| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber) [Rust](src/main/rust/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 #### Day 4 | | | | | | | |-|-|-|-|-|-|- -| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 -| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 +| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game) [Rust](src/main/rust/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 +| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii) [Rust](src/main/rust/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 #### Day 5 | | | | | | | |-|-|-|-|-|-|- -| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 +| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray) [Rust](src/main/rust/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 #### Day 6 | | | | | | | |-|-|-|-|-|-|- -| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 +| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray) [Rust](src/main/rust/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 #### Day 7 | | | | | | | |-|-|-|-|-|-|- -| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 +| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Rust](src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 #### Day 8 @@ -947,8 +824,8 @@ | | | | | | | |-|-|-|-|-|-|- -| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 -| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 +| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break) [Rust](src/main/rust/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 +| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water) [Rust](src/main/rust/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 #### Day 10 @@ -959,7 +836,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0096 |Unique Binary Search Trees| [Java](src/main/java/g0001_0100/s0096_unique_binary_search_trees) [Kotlin](src/main/kotlin/g0001_0100/s0096_unique_binary_search_trees) [TypeScript](src/main/ts/g0001_0100/s0096_unique_binary_search_trees) [Scala](src/main/scala/g0001_0100/s0096_unique_binary_search_trees) [Ruby](src/main/ruby/g0001_0100/s0096_unique_binary_search_trees) [PHP](src/main/php/g0001_0100/s0096_unique_binary_search_trees) [C#](src/main/csharp/g0001_0100/s0096_unique_binary_search_trees) [Go](src/main/go/g0001_0100/s0096_unique_binary_search_trees) [Cpp](src/main/cpp/g0001_0100/s0096_unique_binary_search_trees) [Python](src/main/python/g0001_0100/s0096_unique_binary_search_trees) [Swift](src/main/swift/g0001_0100/s0096_unique_binary_search_trees) [Elixir](src/main/elixir/g0001_0100/s0096_unique_binary_search_trees)| Medium | Top_100_Liked_Questions, Dynamic_Programming, Math, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(1) | 45 | 96.00 +| 0096 |Unique Binary Search Trees| [Java](src/main/java/g0001_0100/s0096_unique_binary_search_trees) [Kotlin](src/main/kotlin/g0001_0100/s0096_unique_binary_search_trees) [TypeScript](src/main/ts/g0001_0100/s0096_unique_binary_search_trees) [Scala](src/main/scala/g0001_0100/s0096_unique_binary_search_trees) [Ruby](src/main/ruby/g0001_0100/s0096_unique_binary_search_trees) [PHP](src/main/php/g0001_0100/s0096_unique_binary_search_trees) [C#](src/main/csharp/g0001_0100/s0096_unique_binary_search_trees) [Go](src/main/go/g0001_0100/s0096_unique_binary_search_trees) [Cpp](src/main/cpp/g0001_0100/s0096_unique_binary_search_trees) [Python](src/main/python/g0001_0100/s0096_unique_binary_search_trees) [Swift](src/main/swift/g0001_0100/s0096_unique_binary_search_trees) [Elixir](src/main/elixir/g0001_0100/s0096_unique_binary_search_trees) [Rust](src/main/rust/g0001_0100/s0096_unique_binary_search_trees)| Medium | Top_100_Liked_Questions, Dynamic_Programming, Math, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(1) | 45 | 96.00 #### Day 12 @@ -980,39 +857,39 @@ | | | | | | | |-|-|-|-|-|-|- -| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 +| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths) [Rust](src/main/rust/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 #### Day 16 | | | | | | | |-|-|-|-|-|-|- -| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 -| 0221 |Maximal Square| [Java](src/main/java/g0201_0300/s0221_maximal_square) [Kotlin](src/main/kotlin/g0201_0300/s0221_maximal_square) [TypeScript](src/main/ts/g0201_0300/s0221_maximal_square) [Scala](src/main/scala/g0201_0300/s0221_maximal_square) [Ruby](src/main/ruby/g0201_0300/s0221_maximal_square) [PHP](src/main/php/g0201_0300/s0221_maximal_square) [C#](src/main/csharp/g0201_0300/s0221_maximal_square) [Go](src/main/go/g0201_0300/s0221_maximal_square) [Cpp](src/main/cpp/g0201_0300/s0221_maximal_square) [Python](src/main/python/g0201_0300/s0221_maximal_square) [Swift](src/main/swift/g0201_0300/s0221_maximal_square) [Elixir](src/main/elixir/g0201_0300/s0221_maximal_square)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 83 | 79.70 +| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum) [Rust](src/main/rust/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 +| 0221 |Maximal Square| [Java](src/main/java/g0201_0300/s0221_maximal_square) [Kotlin](src/main/kotlin/g0201_0300/s0221_maximal_square) [TypeScript](src/main/ts/g0201_0300/s0221_maximal_square) [Scala](src/main/scala/g0201_0300/s0221_maximal_square) [Ruby](src/main/ruby/g0201_0300/s0221_maximal_square) [PHP](src/main/php/g0201_0300/s0221_maximal_square) [C#](src/main/csharp/g0201_0300/s0221_maximal_square) [Go](src/main/go/g0201_0300/s0221_maximal_square) [Cpp](src/main/cpp/g0201_0300/s0221_maximal_square) [Python](src/main/python/g0201_0300/s0221_maximal_square) [Swift](src/main/swift/g0201_0300/s0221_maximal_square) [Elixir](src/main/elixir/g0201_0300/s0221_maximal_square) [Rust](src/main/rust/g0201_0300/s0221_maximal_square)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Big_O_Time_O(m\*n)_Space_O(m\*n) | 83 | 79.70 #### Day 17 | | | | | | | |-|-|-|-|-|-|- -| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 +| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring) [Rust](src/main/rust/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 #### Day 18 | | | | | | | |-|-|-|-|-|-|- -| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 +| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence) [Rust](src/main/rust/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 #### Day 19 | | | | | | | |-|-|-|-|-|-|- -| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 -| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 +| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence) [Rust](src/main/rust/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 +| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance) [Rust](src/main/rust/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 #### Day 20 | | | | | | | |-|-|-|-|-|-|- -| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 +| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change) [Rust](src/main/rust/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 #### Day 21 @@ -1050,7 +927,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 +| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes) [Rust](src/main/rust/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 #### Day 7 Array @@ -1071,7 +948,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 +| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree) [Rust](src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 #### Day 11 Containers and Libraries @@ -1114,13 +991,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0739 |Daily Temperatures| [Java](src/main/java/g0701_0800/s0739_daily_temperatures) [Kotlin](src/main/kotlin/g0701_0800/s0739_daily_temperatures) [TypeScript](src/main/ts/g0701_0800/s0739_daily_temperatures) [Scala](src/main/scala/g0701_0800/s0739_daily_temperatures) [Ruby](src/main/ruby/g0701_0800/s0739_daily_temperatures) [PHP](src/main/php/g0701_0800/s0739_daily_temperatures) [C#](src/main/csharp/g0701_0800/s0739_daily_temperatures) [Go](src/main/go/g0701_0800/s0739_daily_temperatures) [Cpp](src/main/cpp/g0701_0800/s0739_daily_temperatures) [Python](src/main/python/g0701_0800/s0739_daily_temperatures) [Swift](src/main/swift/g0701_0800/s0739_daily_temperatures) [Elixir](src/main/elixir/g0701_0800/s0739_daily_temperatures)| Medium | Top_100_Liked_Questions, Array, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(n) | 194 | 97.36 +| 0739 |Daily Temperatures| [Java](src/main/java/g0701_0800/s0739_daily_temperatures) [Kotlin](src/main/kotlin/g0701_0800/s0739_daily_temperatures) [TypeScript](src/main/ts/g0701_0800/s0739_daily_temperatures) [Scala](src/main/scala/g0701_0800/s0739_daily_temperatures) [Ruby](src/main/ruby/g0701_0800/s0739_daily_temperatures) [PHP](src/main/php/g0701_0800/s0739_daily_temperatures) [C#](src/main/csharp/g0701_0800/s0739_daily_temperatures) [Go](src/main/go/g0701_0800/s0739_daily_temperatures) [Cpp](src/main/cpp/g0701_0800/s0739_daily_temperatures) [Python](src/main/python/g0701_0800/s0739_daily_temperatures) [Swift](src/main/swift/g0701_0800/s0739_daily_temperatures) [Elixir](src/main/elixir/g0701_0800/s0739_daily_temperatures) [Rust](src/main/rust/g0701_0800/s0739_daily_temperatures)| Medium | Top_100_Liked_Questions, Array, Stack, Monotonic_Stack, Big_O_Time_O(n)_Space_O(n) | 194 | 97.36 #### Day 7 | | | | | | | |-|-|-|-|-|-|- -| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 +| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image) [Rust](src/main/rust/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 #### Day 8 @@ -1141,13 +1018,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 +| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams) [Rust](src/main/rust/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 #### Day 12 | | | | | | | |-|-|-|-|-|-|- -| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 +| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string) [Rust](src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 #### Day 13 @@ -1158,13 +1035,13 @@ | | | | | | | |-|-|-|-|-|-|- -| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 +| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer) [Rust](src/main/rust/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 #### Day 15 | | | | | | | |-|-|-|-|-|-|- -| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 +| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers) [Rust](src/main/rust/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 #### Day 16 @@ -1180,7 +1057,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 +| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack) [Rust](src/main/rust/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 #### Day 19 @@ -1198,7 +1075,7 @@ | | | | | | | |-|-|-|-|-|-|- -| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 +| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands) [Rust](src/main/rust/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 #### Day 2 Matrix Related Problems @@ -1333,26 +1210,26 @@ | | | | | | | |-|-|-|-|-|-|- -| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/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) | 59 | 86.77 -| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/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) | 51 | 92.87 +| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists) [Rust](src/main/rust/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) | 59 | 86.77 +| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list) [Rust](src/main/rust/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) | 51 | 92.87 #### Day 4 Linked List | | | | | | | |-|-|-|-|-|-|- -| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 +| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii) [Rust](src/main/rust/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 #### Day 5 Greedy | | | | | | | |-|-|-|-|-|-|- -| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 +| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Rust](src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 #### Day 6 Tree | | | | | | | |-|-|-|-|-|-|- -| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 +| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal) [Rust](src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 #### Day 7 Binary Search @@ -1363,157 +1240,280 @@ | | | | | | | |-|-|-|-|-|-|- -| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 +| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree) [Rust](src/main/rust/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 #### Day 9 Graph/BFS/DFS | | | | | | | |-|-|-|-|-|-|- -| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 +| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands) [Rust](src/main/rust/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 #### Day 10 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/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) | 44 | 94.58 +| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs) [Rust](src/main/rust/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) | 44 | 94.58 #### Day 11 Dynamic Programming | | | | | | | |-|-|-|-|-|-|- -| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 +| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths) [Rust](src/main/rust/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 #### Day 12 Sliding Window/Two Pointer | | | | | | | |-|-|-|-|-|-|- -| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 +| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string) [Rust](src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 #### Day 13 Hashmap | | | | | | | |-|-|-|-|-|-|- -| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 +| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum) [Rust](src/main/rust/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 #### Day 14 Stack | | | | | | | |-|-|-|-|-|-|- -| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 +| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string) [Rust](src/main/rust/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 #### Day 15 Heap | | | | | | | |-|-|-|-|-|-|- +### Level 2 + +#### Day 1 Implementation/Simulation + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 2 String + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 3 Linked List + +| | | | | | | +|-|-|-|-|-|-|- +| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Rust](src/main/rust/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) | 54 | 87.87 +| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list) [Rust](src/main/rust/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 + +#### Day 4 Linked List + +| | | | | | | +|-|-|-|-|-|-|- +| 0148 |Sort List| [Java](src/main/java/g0101_0200/s0148_sort_list) [Kotlin](src/main/kotlin/g0101_0200/s0148_sort_list) [TypeScript](src/main/ts/g0101_0200/s0148_sort_list) [Scala](src/main/scala/g0101_0200/s0148_sort_list) [Ruby](src/main/ruby/g0101_0200/s0148_sort_list) [PHP](src/main/php/g0101_0200/s0148_sort_list) [C#](src/main/csharp/g0101_0200/s0148_sort_list) [Go](src/main/go/g0101_0200/s0148_sort_list) [Cpp](src/main/cpp/g0101_0200/s0148_sort_list) [Python](src/main/python/g0101_0200/s0148_sort_list) [Swift](src/main/swift/g0101_0200/s0148_sort_list) [Elixir](src/main/elixir/g0101_0200/s0148_sort_list) [Rust](src/main/rust/g0101_0200/s0148_sort_list)| 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)) | 141 | 97.14 + +#### Day 5 Greedy + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 6 Tree + +| | | | | | | +|-|-|-|-|-|-|- +| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree) [Rust](src/main/rust/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 + +#### Day 7 Tree + +| | | | | | | +|-|-|-|-|-|-|- +| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree) [Rust](src/main/rust/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 +| 0437 |Path Sum III| [Java](src/main/java/g0401_0500/s0437_path_sum_iii) [Kotlin](src/main/kotlin/g0401_0500/s0437_path_sum_iii) [TypeScript](src/main/ts/g0401_0500/s0437_path_sum_iii) [Scala](src/main/scala/g0401_0500/s0437_path_sum_iii) [Ruby](src/main/ruby/g0401_0500/s0437_path_sum_iii) [PHP](src/main/php/g0401_0500/s0437_path_sum_iii) [C#](src/main/csharp/g0401_0500/s0437_path_sum_iii) [Go](src/main/go/g0401_0500/s0437_path_sum_iii) [Cpp](src/main/cpp/g0401_0500/s0437_path_sum_iii) [Python](src/main/python/g0401_0500/s0437_path_sum_iii) [Swift](src/main/swift/g0401_0500/s0437_path_sum_iii) [Elixir](src/main/elixir/g0401_0500/s0437_path_sum_iii) [Rust](src/main/rust/g0401_0500/s0437_path_sum_iii)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 68 | 86.71 + +#### Day 8 Binary Search + +| | | | | | | +|-|-|-|-|-|-|- +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array) [Rust](src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 + +#### Day 9 Binary Search Tree + +| | | | | | | +|-|-|-|-|-|-|- +| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Rust](src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 + +#### Day 10 Graph/BFS/DFS + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 11 Graph/BFS/DFS + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 12 Dynamic Programming + +| | | | | | | +|-|-|-|-|-|-|- +| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber) [Rust](src/main/rust/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 +| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change) [Rust](src/main/rust/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 + +#### Day 13 Dynamic Programming + +| | | | | | | +|-|-|-|-|-|-|- +| 0416 |Partition Equal Subset Sum| [Java](src/main/java/g0401_0500/s0416_partition_equal_subset_sum) [Kotlin](src/main/kotlin/g0401_0500/s0416_partition_equal_subset_sum) [TypeScript](src/main/ts/g0401_0500/s0416_partition_equal_subset_sum) [Scala](src/main/scala/g0401_0500/s0416_partition_equal_subset_sum) [Ruby](src/main/ruby/g0401_0500/s0416_partition_equal_subset_sum) [PHP](src/main/php/g0401_0500/s0416_partition_equal_subset_sum) [C#](src/main/csharp/g0401_0500/s0416_partition_equal_subset_sum) [Go](src/main/go/g0401_0500/s0416_partition_equal_subset_sum) [Cpp](src/main/cpp/g0401_0500/s0416_partition_equal_subset_sum) [Python](src/main/python/g0401_0500/s0416_partition_equal_subset_sum) [Swift](src/main/swift/g0401_0500/s0416_partition_equal_subset_sum) [Elixir](src/main/elixir/g0401_0500/s0416_partition_equal_subset_sum) [Rust](src/main/rust/g0401_0500/s0416_partition_equal_subset_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Big_O_Time_O(n\*sums)_Space_O(n\*sums) | 91 | 74.38 +| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray) [Rust](src/main/rust/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 + +#### Day 14 Sliding Window/Two Pointer + +| | | | | | | +|-|-|-|-|-|-|- +| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/g0001_0100/s0003_longest_substring_without_repeating_characters) [Rust](src/main/rust/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) | 65 | 90.77 +| 0076 |Minimum Window Substring| [Java](src/main/java/g0001_0100/s0076_minimum_window_substring) [Kotlin](src/main/kotlin/g0001_0100/s0076_minimum_window_substring) [TypeScript](src/main/ts/g0001_0100/s0076_minimum_window_substring) [Scala](src/main/scala/g0001_0100/s0076_minimum_window_substring) [Ruby](src/main/ruby/g0001_0100/s0076_minimum_window_substring) [PHP](src/main/php/g0001_0100/s0076_minimum_window_substring) [C#](src/main/csharp/g0001_0100/s0076_minimum_window_substring) [Go](src/main/go/g0001_0100/s0076_minimum_window_substring) [Cpp](src/main/cpp/g0001_0100/s0076_minimum_window_substring) [Python](src/main/python/g0001_0100/s0076_minimum_window_substring) [Swift](src/main/swift/g0001_0100/s0076_minimum_window_substring) [Elixir](src/main/elixir/g0001_0100/s0076_minimum_window_substring) [Rust](src/main/rust/g0001_0100/s0076_minimum_window_substring)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Big_O_Time_O(s.length())_Space_O(1) | 82 | 82.17 + +#### Day 15 Tree + +| | | | | | | +|-|-|-|-|-|-|- +| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree) [Rust](src/main/rust/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 + +#### Day 16 Design + +| | | | | | | +|-|-|-|-|-|-|- +| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack) [Rust](src/main/rust/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 +| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree) [Rust](src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 + +#### Day 17 Interval + +| | | | | | | +|-|-|-|-|-|-|- +| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals) [Rust](src/main/rust/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 + +#### Day 18 Stack + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 19 Union Find + +| | | | | | | +|-|-|-|-|-|-|- + +#### Day 20 Brute Force/Backtracking + +| | | | | | | +|-|-|-|-|-|-|- +| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum) [Rust](src/main/rust/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 +| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations) [Rust](src/main/rust/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 + ## Algorithms | # | Title | Language | Difficulty | Tag | Time, ms | Time, % |------|----------------|-----------|-------------|-------------|----------|--------- -| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Algorithm_II_Day_17_Dynamic_Programming, Dynamic_Programming_I_Day_19, Udemy_Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 -| 0763 |Partition Labels| [Java](src/main/java/g0701_0800/s0763_partition_labels) [Kotlin](src/main/kotlin/g0701_0800/s0763_partition_labels) [TypeScript](src/main/ts/g0701_0800/s0763_partition_labels) [Scala](src/main/scala/g0701_0800/s0763_partition_labels) [Ruby](src/main/ruby/g0701_0800/s0763_partition_labels) [PHP](src/main/php/g0701_0800/s0763_partition_labels) [C#](src/main/csharp/g0701_0800/s0763_partition_labels) [Go](src/main/go/g0701_0800/s0763_partition_labels) [Cpp](src/main/cpp/g0701_0800/s0763_partition_labels) [Python](src/main/python/g0701_0800/s0763_partition_labels) [Swift](src/main/swift/g0701_0800/s0763_partition_labels) [Elixir](src/main/elixir/g0701_0800/s0763_partition_labels)| 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) | 54 | 94.74 -| 0739 |Daily Temperatures| [Java](src/main/java/g0701_0800/s0739_daily_temperatures) [Kotlin](src/main/kotlin/g0701_0800/s0739_daily_temperatures) [TypeScript](src/main/ts/g0701_0800/s0739_daily_temperatures) [Scala](src/main/scala/g0701_0800/s0739_daily_temperatures) [Ruby](src/main/ruby/g0701_0800/s0739_daily_temperatures) [PHP](src/main/php/g0701_0800/s0739_daily_temperatures) [C#](src/main/csharp/g0701_0800/s0739_daily_temperatures) [Go](src/main/go/g0701_0800/s0739_daily_temperatures) [Cpp](src/main/cpp/g0701_0800/s0739_daily_temperatures) [Python](src/main/python/g0701_0800/s0739_daily_temperatures) [Swift](src/main/swift/g0701_0800/s0739_daily_temperatures) [Elixir](src/main/elixir/g0701_0800/s0739_daily_temperatures)| Medium | Top_100_Liked_Questions, Array, Stack, Monotonic_Stack, Programming_Skills_II_Day_6, Big_O_Time_O(n)_Space_O(n) | 194 | 97.36 -| 0647 |Palindromic Substrings| [Java](src/main/java/g0601_0700/s0647_palindromic_substrings) [Kotlin](src/main/kotlin/g0601_0700/s0647_palindromic_substrings) [TypeScript](src/main/ts/g0601_0700/s0647_palindromic_substrings) [Scala](src/main/scala/g0601_0700/s0647_palindromic_substrings) [Ruby](src/main/ruby/g0601_0700/s0647_palindromic_substrings) [PHP](src/main/php/g0601_0700/s0647_palindromic_substrings) [C#](src/main/csharp/g0601_0700/s0647_palindromic_substrings) [Go](src/main/go/g0601_0700/s0647_palindromic_substrings) [Cpp](src/main/cpp/g0601_0700/s0647_palindromic_substrings) [Python](src/main/python/g0601_0700/s0647_palindromic_substrings) [Swift](src/main/swift/g0601_0700/s0647_palindromic_substrings) [Elixir](src/main/elixir/g0601_0700/s0647_palindromic_substrings)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n) | 60 | 89.76 -| 0560 |Subarray Sum Equals K| [Java](src/main/java/g0501_0600/s0560_subarray_sum_equals_k) [Kotlin](src/main/kotlin/g0501_0600/s0560_subarray_sum_equals_k) [TypeScript](src/main/ts/g0501_0600/s0560_subarray_sum_equals_k) [Scala](src/main/scala/g0501_0600/s0560_subarray_sum_equals_k) [Ruby](src/main/ruby/g0501_0600/s0560_subarray_sum_equals_k) [PHP](src/main/php/g0501_0600/s0560_subarray_sum_equals_k) [C#](src/main/csharp/g0501_0600/s0560_subarray_sum_equals_k) [Go](src/main/go/g0501_0600/s0560_subarray_sum_equals_k) [Cpp](src/main/cpp/g0501_0600/s0560_subarray_sum_equals_k) [Python](src/main/python/g0501_0600/s0560_subarray_sum_equals_k) [Swift](src/main/swift/g0501_0600/s0560_subarray_sum_equals_k) [Elixir](src/main/elixir/g0501_0600/s0560_subarray_sum_equals_k)| Medium | Top_100_Liked_Questions, Array, Hash_Table, Prefix_Sum, Data_Structure_II_Day_5_Array, Big_O_Time_O(n)_Space_O(n) | 70 | 92.45 -| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Level_2_Day_7_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 -| 0494 |Target Sum| [Java](src/main/java/g0401_0500/s0494_target_sum) [Kotlin](src/main/kotlin/g0401_0500/s0494_target_sum) [TypeScript](src/main/ts/g0401_0500/s0494_target_sum) [Scala](src/main/scala/g0401_0500/s0494_target_sum) [Ruby](src/main/ruby/g0401_0500/s0494_target_sum) [PHP](src/main/php/g0401_0500/s0494_target_sum) [C#](src/main/csharp/g0401_0500/s0494_target_sum) [Go](src/main/go/g0401_0500/s0494_target_sum) [Cpp](src/main/cpp/g0401_0500/s0494_target_sum) [Python](src/main/python/g0401_0500/s0494_target_sum) [Swift](src/main/swift/g0401_0500/s0494_target_sum) [Elixir](src/main/elixir/g0401_0500/s0494_target_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Backtracking, Big_O_Time_O(n\*(sum+s))_Space_O(n\*(sum+s)) | 77 | 81.99 -| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Algorithm_II_Day_5_Sliding_Window, Programming_Skills_II_Day_12, Level_1_Day_12_Sliding_Window/Two_Pointer, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 -| 0437 |Path Sum III| [Java](src/main/java/g0401_0500/s0437_path_sum_iii) [Kotlin](src/main/kotlin/g0401_0500/s0437_path_sum_iii) [TypeScript](src/main/ts/g0401_0500/s0437_path_sum_iii) [Scala](src/main/scala/g0401_0500/s0437_path_sum_iii) [Ruby](src/main/ruby/g0401_0500/s0437_path_sum_iii) [PHP](src/main/php/g0401_0500/s0437_path_sum_iii) [C#](src/main/csharp/g0401_0500/s0437_path_sum_iii) [Go](src/main/go/g0401_0500/s0437_path_sum_iii) [Cpp](src/main/cpp/g0401_0500/s0437_path_sum_iii) [Python](src/main/python/g0401_0500/s0437_path_sum_iii) [Swift](src/main/swift/g0401_0500/s0437_path_sum_iii) [Elixir](src/main/elixir/g0401_0500/s0437_path_sum_iii)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Level_2_Day_7_Tree, Big_O_Time_O(n)_Space_O(n) | 68 | 86.71 -| 0416 |Partition Equal Subset Sum| [Java](src/main/java/g0401_0500/s0416_partition_equal_subset_sum) [Kotlin](src/main/kotlin/g0401_0500/s0416_partition_equal_subset_sum) [TypeScript](src/main/ts/g0401_0500/s0416_partition_equal_subset_sum) [Scala](src/main/scala/g0401_0500/s0416_partition_equal_subset_sum) [Ruby](src/main/ruby/g0401_0500/s0416_partition_equal_subset_sum) [PHP](src/main/php/g0401_0500/s0416_partition_equal_subset_sum) [C#](src/main/csharp/g0401_0500/s0416_partition_equal_subset_sum) [Go](src/main/go/g0401_0500/s0416_partition_equal_subset_sum) [Cpp](src/main/cpp/g0401_0500/s0416_partition_equal_subset_sum) [Python](src/main/python/g0401_0500/s0416_partition_equal_subset_sum) [Swift](src/main/swift/g0401_0500/s0416_partition_equal_subset_sum) [Elixir](src/main/elixir/g0401_0500/s0416_partition_equal_subset_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Level_2_Day_13_Dynamic_Programming, Big_O_Time_O(n\*sums)_Space_O(n\*sums) | 91 | 74.38 -| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Level_1_Day_14_Stack, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 -| 0347 |Top K Frequent Elements| [Java](src/main/java/g0301_0400/s0347_top_k_frequent_elements) [Kotlin](src/main/kotlin/g0301_0400/s0347_top_k_frequent_elements) [TypeScript](src/main/ts/g0301_0400/s0347_top_k_frequent_elements) [Scala](src/main/scala/g0301_0400/s0347_top_k_frequent_elements) [Ruby](src/main/ruby/g0301_0400/s0347_top_k_frequent_elements) [PHP](src/main/php/g0301_0400/s0347_top_k_frequent_elements) [C#](src/main/csharp/g0301_0400/s0347_top_k_frequent_elements) [Go](src/main/go/g0301_0400/s0347_top_k_frequent_elements) [Cpp](src/main/cpp/g0301_0400/s0347_top_k_frequent_elements) [Python](src/main/python/g0301_0400/s0347_top_k_frequent_elements) [Swift](src/main/swift/g0301_0400/s0347_top_k_frequent_elements) [Elixir](src/main/elixir/g0301_0400/s0347_top_k_frequent_elements)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Divide_and_Conquer, Quickselect, Bucket_Sort, Data_Structure_II_Day_20_Heap_Priority_Queue, Big_O_Time_O(n\*log(n))_Space_O(k) | 62 | 87.48 -| 0338 |Counting Bits| [Java](src/main/java/g0301_0400/s0338_counting_bits) [Kotlin](src/main/kotlin/g0301_0400/s0338_counting_bits) [TypeScript](src/main/ts/g0301_0400/s0338_counting_bits) [Scala](src/main/scala/g0301_0400/s0338_counting_bits) [Ruby](src/main/ruby/g0301_0400/s0338_counting_bits) [PHP](src/main/php/g0301_0400/s0338_counting_bits) [C#](src/main/csharp/g0301_0400/s0338_counting_bits) [Go](src/main/go/g0301_0400/s0338_counting_bits) [Cpp](src/main/cpp/g0301_0400/s0338_counting_bits) [Python](src/main/python/g0301_0400/s0338_counting_bits) [Swift](src/main/swift/g0301_0400/s0338_counting_bits) [Elixir](src/main/elixir/g0301_0400/s0338_counting_bits)| Easy | Top_100_Liked_Questions, Dynamic_Programming, Bit_Manipulation, Udemy_Bit_Manipulation, Big_O_Time_O(num)_Space_O(num) | 69 | 86.81 -| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Algorithm_II_Day_18_Dynamic_Programming, Dynamic_Programming_I_Day_20, Level_2_Day_12_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 -| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Algorithm_II_Day_16_Dynamic_Programming, Binary_Search_II_Day_3, Dynamic_Programming_I_Day_18, Udemy_Dynamic_Programming, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 -| 0295 |Find Median from Data Stream| [Java](src/main/java/g0201_0300/s0295_find_median_from_data_stream) [Kotlin](src/main/kotlin/g0201_0300/s0295_find_median_from_data_stream) [TypeScript](src/main/ts/g0201_0300/s0295_find_median_from_data_stream) [Scala](src/main/scala/g0201_0300/s0295_find_median_from_data_stream) [Ruby](src/main/ruby/g0201_0300/s0295_find_median_from_data_stream) [PHP](src/main/php/g0201_0300/s0295_find_median_from_data_stream) [C#](src/main/csharp/g0201_0300/s0295_find_median_from_data_stream) [Go](src/main/go/g0201_0300/s0295_find_median_from_data_stream) [Cpp](src/main/cpp/g0201_0300/s0295_find_median_from_data_stream) [Python](src/main/python/g0201_0300/s0295_find_median_from_data_stream) [Swift](src/main/swift/g0201_0300/s0295_find_median_from_data_stream) [Elixir](src/main/elixir/g0201_0300/s0295_find_median_from_data_stream)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Sorting, Two_Pointers, Design, Heap_Priority_Queue, Data_Stream, Big_O_Time_O(n\*log_n)_Space_O(n) | 335 | 99.44 -| 0287 |Find the Duplicate Number| [Java](src/main/java/g0201_0300/s0287_find_the_duplicate_number) [Kotlin](src/main/kotlin/g0201_0300/s0287_find_the_duplicate_number) [TypeScript](src/main/ts/g0201_0300/s0287_find_the_duplicate_number) [Scala](src/main/scala/g0201_0300/s0287_find_the_duplicate_number) [Ruby](src/main/ruby/g0201_0300/s0287_find_the_duplicate_number) [PHP](src/main/php/g0201_0300/s0287_find_the_duplicate_number) [C#](src/main/csharp/g0201_0300/s0287_find_the_duplicate_number) [Go](src/main/go/g0201_0300/s0287_find_the_duplicate_number) [Cpp](src/main/cpp/g0201_0300/s0287_find_the_duplicate_number) [Python](src/main/python/g0201_0300/s0287_find_the_duplicate_number) [Swift](src/main/swift/g0201_0300/s0287_find_the_duplicate_number) [Elixir](src/main/elixir/g0201_0300/s0287_find_the_duplicate_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Two_Pointers, Bit_Manipulation, Binary_Search_II_Day_5, Big_O_Time_O(n)_Space_O(n) | 60 | 98.11 -| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Algorithm_I_Day_3_Two_Pointers, Programming_Skills_I_Day_6_Array, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 -| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Data_Structure_II_Day_4_Array, Binary_Search_II_Day_8, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 -| 0239 |Sliding Window Maximum| [Java](src/main/java/g0201_0300/s0239_sliding_window_maximum) [Kotlin](src/main/kotlin/g0201_0300/s0239_sliding_window_maximum) [TypeScript](src/main/ts/g0201_0300/s0239_sliding_window_maximum) [Scala](src/main/scala/g0201_0300/s0239_sliding_window_maximum) [Ruby](src/main/ruby/g0201_0300/s0239_sliding_window_maximum) [PHP](src/main/php/g0201_0300/s0239_sliding_window_maximum) [C#](src/main/csharp/g0201_0300/s0239_sliding_window_maximum) [Go](src/main/go/g0201_0300/s0239_sliding_window_maximum) [Cpp](src/main/cpp/g0201_0300/s0239_sliding_window_maximum) [Python](src/main/python/g0201_0300/s0239_sliding_window_maximum) [Swift](src/main/swift/g0201_0300/s0239_sliding_window_maximum) [Elixir](src/main/elixir/g0201_0300/s0239_sliding_window_maximum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Heap_Priority_Queue, Sliding_Window, Queue, Monotonic_Queue, Udemy_Arrays, Big_O_Time_O(n\*k)_Space_O(n+k) | 216 | 99.50 -| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Data_Structure_II_Day_5_Array, Udemy_Arrays, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 -| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Data_Structure_II_Day_18_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 -| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Level_2_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 -| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Data_Structure_II_Day_17_Tree, Level_2_Day_9_Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 -| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_12_Tree, Level_2_Day_6_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 -| 0221 |Maximal Square| [Java](src/main/java/g0201_0300/s0221_maximal_square) [Kotlin](src/main/kotlin/g0201_0300/s0221_maximal_square) [TypeScript](src/main/ts/g0201_0300/s0221_maximal_square) [Scala](src/main/scala/g0201_0300/s0221_maximal_square) [Ruby](src/main/ruby/g0201_0300/s0221_maximal_square) [PHP](src/main/php/g0201_0300/s0221_maximal_square) [C#](src/main/csharp/g0201_0300/s0221_maximal_square) [Go](src/main/go/g0201_0300/s0221_maximal_square) [Cpp](src/main/cpp/g0201_0300/s0221_maximal_square) [Python](src/main/python/g0201_0300/s0221_maximal_square) [Swift](src/main/swift/g0201_0300/s0221_maximal_square) [Elixir](src/main/elixir/g0201_0300/s0221_maximal_square)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Dynamic_Programming_I_Day_16, Big_O_Time_O(m\*n)_Space_O(m\*n) | 83 | 79.70 -| 0215 |Kth Largest Element in an Array| [Java](src/main/java/g0201_0300/s0215_kth_largest_element_in_an_array) [Kotlin](src/main/kotlin/g0201_0300/s0215_kth_largest_element_in_an_array) [TypeScript](src/main/ts/g0201_0300/s0215_kth_largest_element_in_an_array) [Scala](src/main/scala/g0201_0300/s0215_kth_largest_element_in_an_array) [Ruby](src/main/ruby/g0201_0300/s0215_kth_largest_element_in_an_array) [PHP](src/main/php/g0201_0300/s0215_kth_largest_element_in_an_array) [C#](src/main/csharp/g0201_0300/s0215_kth_largest_element_in_an_array) [Go](src/main/go/g0201_0300/s0215_kth_largest_element_in_an_array) [Cpp](src/main/cpp/g0201_0300/s0215_kth_largest_element_in_an_array) [Python](src/main/python/g0201_0300/s0215_kth_largest_element_in_an_array) [Swift](src/main/swift/g0201_0300/s0215_kth_largest_element_in_an_array) [Elixir](src/main/elixir/g0201_0300/s0215_kth_largest_element_in_an_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Quickselect, Data_Structure_II_Day_20_Heap_Priority_Queue, Big_O_Time_O(n\*log(n))_Space_O(log(n)) | 148 | 54.45 -| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Level_2_Day_16_Design, Udemy_Trie_and_Heap, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 -| 0207 |Course Schedule| [Java](src/main/java/g0201_0300/s0207_course_schedule) [Kotlin](src/main/kotlin/g0201_0300/s0207_course_schedule) [TypeScript](src/main/ts/g0201_0300/s0207_course_schedule) [Scala](src/main/scala/g0201_0300/s0207_course_schedule) [Ruby](src/main/ruby/g0201_0300/s0207_course_schedule) [PHP](src/main/php/g0201_0300/s0207_course_schedule) [C#](src/main/csharp/g0201_0300/s0207_course_schedule) [Go](src/main/go/g0201_0300/s0207_course_schedule) [Cpp](src/main/cpp/g0201_0300/s0207_course_schedule) [Python](src/main/python/g0201_0300/s0207_course_schedule) [Swift](src/main/swift/g0201_0300/s0207_course_schedule) [Elixir](src/main/elixir/g0201_0300/s0207_course_schedule)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Graph, Topological_Sort, Big_O_Time_O(N)_Space_O(N) | 68 | 70.14 -| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Data_Structure_I_Day_8_Linked_List, Algorithm_I_Day_10_Recursion_Backtracking, Level_1_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 51 | 92.87 -| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Algorithm_II_Day_6_Breadth_First_Search_Depth_First_Search, Graph_Theory_I_Day_1_Matrix_Related_Problems, Level_1_Day_9_Graph/BFS/DFS, Udemy_Graph, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 -| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Algorithm_I_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_3, Level_2_Day_12_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 -| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Algorithm_I_Day_2_Two_Pointers, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 75 | 97.25 -| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Data_Structure_II_Day_1_Array, Udemy_Famous_Algorithm, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 -| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_II_Day_11_Linked_List, Udemy_Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 -| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Data_Structure_II_Day_14_Stack_Queue, Programming_Skills_II_Day_18, Level_2_Day_16_Design, Udemy_Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 -| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Algorithm_II_Day_2_Binary_Search, Binary_Search_I_Day_12, Udemy_Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 -| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Dynamic_Programming_I_Day_6, Level_2_Day_13_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 -| 0148 |Sort List| [Java](src/main/java/g0101_0200/s0148_sort_list) [Kotlin](src/main/kotlin/g0101_0200/s0148_sort_list) [TypeScript](src/main/ts/g0101_0200/s0148_sort_list) [Scala](src/main/scala/g0101_0200/s0148_sort_list) [Ruby](src/main/ruby/g0101_0200/s0148_sort_list) [PHP](src/main/php/g0101_0200/s0148_sort_list) [C#](src/main/csharp/g0101_0200/s0148_sort_list) [Go](src/main/go/g0101_0200/s0148_sort_list) [Cpp](src/main/cpp/g0101_0200/s0148_sort_list) [Python](src/main/python/g0101_0200/s0148_sort_list) [Swift](src/main/swift/g0101_0200/s0148_sort_list) [Elixir](src/main/elixir/g0101_0200/s0148_sort_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Sorting, Two_Pointers, Linked_List, Divide_and_Conquer, Merge_Sort, Level_2_Day_4_Linked_List, Big_O_Time_O(log(N))_Space_O(log(N)) | 141 | 97.14 -| 0146 |LRU Cache| [Java](src/main/java/g0101_0200/s0146_lru_cache) [Kotlin](src/main/kotlin/g0101_0200/s0146_lru_cache) [TypeScript](src/main/ts/g0101_0200/s0146_lru_cache) [Scala](src/main/scala/g0101_0200/s0146_lru_cache) [Ruby](src/main/ruby/g0101_0200/s0146_lru_cache) [PHP](src/main/php/g0101_0200/s0146_lru_cache) [C#](src/main/csharp/g0101_0200/s0146_lru_cache) [Go](src/main/go/g0101_0200/s0146_lru_cache) [Cpp](src/main/cpp/g0101_0200/s0146_lru_cache) [Python](src/main/python/g0101_0200/s0146_lru_cache) [Swift](src/main/swift/g0101_0200/s0146_lru_cache) [Elixir](src/main/elixir/g0101_0200/s0146_lru_cache)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Design, Linked_List, Doubly_Linked_List, Udemy_Linked_List, Big_O_Time_O(1)_Space_O(capacity) | 473 | 94.72 -| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_II_Day_10_Linked_List, Level_1_Day_4_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 -| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_I_Day_7_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 -| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Algorithm_II_Day_15_Dynamic_Programming, Dynamic_Programming_I_Day_9, Udemy_Dynamic_Programming, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 -| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Programming_Skills_II_Day_14, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 -| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Data_Structure_II_Day_1_Array, Algorithm_I_Day_14_Bit_Manipulation, Udemy_Integers, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 -| 0131 |Palindrome Partitioning| [Java](src/main/java/g0101_0200/s0131_palindrome_partitioning) [Kotlin](src/main/kotlin/g0101_0200/s0131_palindrome_partitioning) [TypeScript](src/main/ts/g0101_0200/s0131_palindrome_partitioning) [Scala](src/main/scala/g0101_0200/s0131_palindrome_partitioning) [Ruby](src/main/ruby/g0101_0200/s0131_palindrome_partitioning) [PHP](src/main/php/g0101_0200/s0131_palindrome_partitioning) [C#](src/main/csharp/g0101_0200/s0131_palindrome_partitioning) [Go](src/main/go/g0101_0200/s0131_palindrome_partitioning) [Cpp](src/main/cpp/g0101_0200/s0131_palindrome_partitioning) [Python](src/main/python/g0101_0200/s0131_palindrome_partitioning) [Swift](src/main/swift/g0101_0200/s0131_palindrome_partitioning) [Elixir](src/main/elixir/g0101_0200/s0131_palindrome_partitioning)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(N\*2^N)_Space_O(2^N\*N) | 203 | 99.22 -| 0128 |Longest Consecutive Sequence| [Java](src/main/java/g0101_0200/s0128_longest_consecutive_sequence) [Kotlin](src/main/kotlin/g0101_0200/s0128_longest_consecutive_sequence) [TypeScript](src/main/ts/g0101_0200/s0128_longest_consecutive_sequence) [Scala](src/main/scala/g0101_0200/s0128_longest_consecutive_sequence) [Ruby](src/main/ruby/g0101_0200/s0128_longest_consecutive_sequence) [PHP](src/main/php/g0101_0200/s0128_longest_consecutive_sequence) [C#](src/main/csharp/g0101_0200/s0128_longest_consecutive_sequence) [Go](src/main/go/g0101_0200/s0128_longest_consecutive_sequence) [Cpp](src/main/cpp/g0101_0200/s0128_longest_consecutive_sequence) [Python](src/main/python/g0101_0200/s0128_longest_consecutive_sequence) [Swift](src/main/swift/g0101_0200/s0128_longest_consecutive_sequence) [Elixir](src/main/elixir/g0101_0200/s0128_longest_consecutive_sequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Union_Find, Big_O_Time_O(N_log_N)_Space_O(1) | 92 | 93.69 -| 0124 |Binary Tree Maximum Path Sum| [Java](src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum) [Kotlin](src/main/kotlin/g0101_0200/s0124_binary_tree_maximum_path_sum) [TypeScript](src/main/ts/g0101_0200/s0124_binary_tree_maximum_path_sum) [Scala](src/main/scala/g0101_0200/s0124_binary_tree_maximum_path_sum) [Ruby](src/main/ruby/g0101_0200/s0124_binary_tree_maximum_path_sum) [PHP](src/main/php/g0101_0200/s0124_binary_tree_maximum_path_sum) [C#](src/main/csharp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Go](src/main/go/g0101_0200/s0124_binary_tree_maximum_path_sum) [Cpp](src/main/cpp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Python](src/main/python/g0101_0200/s0124_binary_tree_maximum_path_sum) [Swift](src/main/swift/g0101_0200/s0124_binary_tree_maximum_path_sum) [Elixir](src/main/elixir/g0101_0200/s0124_binary_tree_maximum_path_sum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Depth_First_Search, Tree, Binary_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(N) | 61 | 96.73 -| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Data_Structure_I_Day_3_Array, Dynamic_Programming_I_Day_7, Level_1_Day_5_Greedy, Udemy_Arrays, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 -| 0114 |Flatten Binary Tree to Linked List| [Java](src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Kotlin](src/main/kotlin/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [TypeScript](src/main/ts/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Scala](src/main/scala/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Ruby](src/main/ruby/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [PHP](src/main/php/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [C#](src/main/csharp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Go](src/main/go/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Cpp](src/main/cpp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Python](src/main/python/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Swift](src/main/swift/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Elixir](src/main/elixir/g0101_0200/s0114_flatten_binary_tree_to_linked_list)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(N) | 55 | 90.66 -| 0105 |Construct Binary Tree from Preorder and Inorder Traversal| [Java](src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [TypeScript](src/main/ts/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Scala](src/main/scala/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Ruby](src/main/ruby/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [PHP](src/main/php/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [C#](src/main/csharp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Go](src/main/go/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Cpp](src/main/cpp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Python](src/main/python/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Swift](src/main/swift/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Elixir](src/main/elixir/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Tree, Binary_Tree, Divide_and_Conquer, Data_Structure_II_Day_15_Tree, Big_O_Time_O(N)_Space_O(N) | 65 | 96.47 -| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Programming_Skills_I_Day_10_Linked_List_and_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 -| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Level_1_Day_6_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 -| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Level_2_Day_15_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 -| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Data_Structure_I_Day_14_Tree, Level_1_Day_8_Binary_Search_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 -| 0096 |Unique Binary Search Trees| [Java](src/main/java/g0001_0100/s0096_unique_binary_search_trees) [Kotlin](src/main/kotlin/g0001_0100/s0096_unique_binary_search_trees) [TypeScript](src/main/ts/g0001_0100/s0096_unique_binary_search_trees) [Scala](src/main/scala/g0001_0100/s0096_unique_binary_search_trees) [Ruby](src/main/ruby/g0001_0100/s0096_unique_binary_search_trees) [PHP](src/main/php/g0001_0100/s0096_unique_binary_search_trees) [C#](src/main/csharp/g0001_0100/s0096_unique_binary_search_trees) [Go](src/main/go/g0001_0100/s0096_unique_binary_search_trees) [Cpp](src/main/cpp/g0001_0100/s0096_unique_binary_search_trees) [Python](src/main/python/g0001_0100/s0096_unique_binary_search_trees) [Swift](src/main/swift/g0001_0100/s0096_unique_binary_search_trees) [Elixir](src/main/elixir/g0001_0100/s0096_unique_binary_search_trees)| Medium | Top_100_Liked_Questions, Dynamic_Programming, Math, Tree, Binary_Tree, Binary_Search_Tree, Dynamic_Programming_I_Day_11, Big_O_Time_O(n)_Space_O(1) | 45 | 96.00 -| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Data_Structure_I_Day_10_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 -| 0084 |Largest Rectangle in Histogram| [Java](src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram) [Kotlin](src/main/kotlin/g0001_0100/s0084_largest_rectangle_in_histogram) [TypeScript](src/main/ts/g0001_0100/s0084_largest_rectangle_in_histogram) [Scala](src/main/scala/g0001_0100/s0084_largest_rectangle_in_histogram) [Ruby](src/main/ruby/g0001_0100/s0084_largest_rectangle_in_histogram) [PHP](src/main/php/g0001_0100/s0084_largest_rectangle_in_histogram) [C#](src/main/csharp/g0001_0100/s0084_largest_rectangle_in_histogram) [Go](src/main/go/g0001_0100/s0084_largest_rectangle_in_histogram) [Cpp](src/main/cpp/g0001_0100/s0084_largest_rectangle_in_histogram) [Python](src/main/python/g0001_0100/s0084_largest_rectangle_in_histogram) [Swift](src/main/swift/g0001_0100/s0084_largest_rectangle_in_histogram) [Elixir](src/main/elixir/g0001_0100/s0084_largest_rectangle_in_histogram)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Stack, Monotonic_Stack, Big_O_Time_O(n_log_n)_Space_O(log_n) | 78 | 92.44 -| 0079 |Word Search| [Java](src/main/java/g0001_0100/s0079_word_search) [Kotlin](src/main/kotlin/g0001_0100/s0079_word_search) [TypeScript](src/main/ts/g0001_0100/s0079_word_search) [Scala](src/main/scala/g0001_0100/s0079_word_search) [Ruby](src/main/ruby/g0001_0100/s0079_word_search) [PHP](src/main/php/g0001_0100/s0079_word_search) [C#](src/main/csharp/g0001_0100/s0079_word_search) [Go](src/main/go/g0001_0100/s0079_word_search) [Cpp](src/main/cpp/g0001_0100/s0079_word_search) [Python](src/main/python/g0001_0100/s0079_word_search) [Swift](src/main/swift/g0001_0100/s0079_word_search) [Elixir](src/main/elixir/g0001_0100/s0079_word_search)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Matrix, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Big_O_Time_O(4^(m\*n))_Space_O(m\*n) | 327 | 95.78 -| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Algorithm_II_Day_9_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 -| 0076 |Minimum Window Substring| [Java](src/main/java/g0001_0100/s0076_minimum_window_substring) [Kotlin](src/main/kotlin/g0001_0100/s0076_minimum_window_substring) [TypeScript](src/main/ts/g0001_0100/s0076_minimum_window_substring) [Scala](src/main/scala/g0001_0100/s0076_minimum_window_substring) [Ruby](src/main/ruby/g0001_0100/s0076_minimum_window_substring) [PHP](src/main/php/g0001_0100/s0076_minimum_window_substring) [C#](src/main/csharp/g0001_0100/s0076_minimum_window_substring) [Go](src/main/go/g0001_0100/s0076_minimum_window_substring) [Cpp](src/main/cpp/g0001_0100/s0076_minimum_window_substring) [Python](src/main/python/g0001_0100/s0076_minimum_window_substring) [Swift](src/main/swift/g0001_0100/s0076_minimum_window_substring) [Elixir](src/main/elixir/g0001_0100/s0076_minimum_window_substring)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Level_2_Day_14_Sliding_Window/Two_Pointer, Big_O_Time_O(s.length())_Space_O(1) | 82 | 82.17 -| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Data_Structure_II_Day_2_Array, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 -| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Data_Structure_I_Day_5_Array, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_8, Level_2_Day_8_Binary_Search, Udemy_2D_Arrays/Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 -| 0073 |Set Matrix Zeroes| [Java](src/main/java/g0001_0100/s0073_set_matrix_zeroes) [Kotlin](src/main/kotlin/g0001_0100/s0073_set_matrix_zeroes) [TypeScript](src/main/ts/g0001_0100/s0073_set_matrix_zeroes) [Scala](src/main/scala/g0001_0100/s0073_set_matrix_zeroes) [Ruby](src/main/ruby/g0001_0100/s0073_set_matrix_zeroes) [PHP](src/main/php/g0001_0100/s0073_set_matrix_zeroes) [C#](src/main/csharp/g0001_0100/s0073_set_matrix_zeroes) [Go](src/main/go/g0001_0100/s0073_set_matrix_zeroes) [Cpp](src/main/cpp/g0001_0100/s0073_set_matrix_zeroes) [Python](src/main/python/g0001_0100/s0073_set_matrix_zeroes) [Swift](src/main/swift/g0001_0100/s0073_set_matrix_zeroes) [Elixir](src/main/elixir/g0001_0100/s0073_set_matrix_zeroes)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Matrix, Udemy_2D_Arrays/Matrix, Big_O_Time_O(m\*n)_Space_O(1) | 61 | 97.66 -| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Algorithm_II_Day_18_Dynamic_Programming, Dynamic_Programming_I_Day_19, Udemy_Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 -| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Algorithm_I_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_2, Level_1_Day_10_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 44 | 94.58 -| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Dynamic_Programming_I_Day_16, Udemy_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 -| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Algorithm_II_Day_13_Dynamic_Programming, Dynamic_Programming_I_Day_15, Level_1_Day_11_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 -| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Data_Structure_II_Day_2_Array, Level_2_Day_17_Interval, Udemy_2D_Arrays/Matrix, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 -| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_4, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 -| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Data_Structure_I_Day_1_Array, Dynamic_Programming_I_Day_5, Udemy_Famous_Algorithm, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 -| 0051 |N-Queens| [Java](src/main/java/g0001_0100/s0051_n_queens) [Kotlin](src/main/kotlin/g0001_0100/s0051_n_queens) [TypeScript](src/main/ts/g0001_0100/s0051_n_queens) [Scala](src/main/scala/g0001_0100/s0051_n_queens) [Ruby](src/main/ruby/g0001_0100/s0051_n_queens) [PHP](src/main/php/g0001_0100/s0051_n_queens) [C#](src/main/csharp/g0001_0100/s0051_n_queens) [Go](src/main/go/g0001_0100/s0051_n_queens) [Cpp](src/main/cpp/g0001_0100/s0051_n_queens) [Python](src/main/python/g0001_0100/s0051_n_queens) [Swift](src/main/swift/g0001_0100/s0051_n_queens) [Elixir](src/main/elixir/g0001_0100/s0051_n_queens)| Hard | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(N!)_Space_O(N) | 57 | 93.84 -| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Data_Structure_II_Day_8_String, Programming_Skills_II_Day_11, Udemy_Strings, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 -| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Data_Structure_II_Day_3_Array, Programming_Skills_II_Day_7, Udemy_2D_Arrays/Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 -| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Algorithm_I_Day_11_Recursion_Backtracking, Level_2_Day_20_Brute_Force/Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 -| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_13_Dynamic_Programming, Dynamic_Programming_I_Day_4, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 -| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Dynamic_Programming_I_Day_9, Udemy_Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 -| 0041 |First Missing Positive| [Java](src/main/java/g0001_0100/s0041_first_missing_positive) [Kotlin](src/main/kotlin/g0001_0100/s0041_first_missing_positive) [TypeScript](src/main/ts/g0001_0100/s0041_first_missing_positive) [Scala](src/main/scala/g0001_0100/s0041_first_missing_positive) [Ruby](src/main/ruby/g0001_0100/s0041_first_missing_positive) [PHP](src/main/php/g0001_0100/s0041_first_missing_positive) [C#](src/main/csharp/g0001_0100/s0041_first_missing_positive) [Go](src/main/go/g0001_0100/s0041_first_missing_positive) [Cpp](src/main/cpp/g0001_0100/s0041_first_missing_positive) [Python](src/main/python/g0001_0100/s0041_first_missing_positive) [Swift](src/main/swift/g0001_0100/s0041_first_missing_positive) [Elixir](src/main/elixir/g0001_0100/s0041_first_missing_positive)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Udemy_Arrays, Big_O_Time_O(n)_Space_O(n) | 55 | 98.51 -| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Algorithm_II_Day_10_Recursion_Backtracking, Level_2_Day_20_Brute_Force/Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 -| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Algorithm_I_Day_1_Binary_Search, Binary_Search_I_Day_2, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 -| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_5, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 -| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_11, Level_2_Day_8_Binary_Search, Udemy_Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 -| 0032 |Longest Valid Parentheses| [Java](src/main/java/g0001_0100/s0032_longest_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0032_longest_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0032_longest_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0032_longest_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0032_longest_valid_parentheses) [PHP](src/main/php/g0001_0100/s0032_longest_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0032_longest_valid_parentheses) [Go](src/main/go/g0001_0100/s0032_longest_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0032_longest_valid_parentheses) [Python](src/main/python/g0001_0100/s0032_longest_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0032_longest_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0032_longest_valid_parentheses)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Stack, Big_O_Time_O(n)_Space_O(1) | 56 | 89.31 -| 0031 |Next Permutation| [Java](src/main/java/g0001_0100/s0031_next_permutation) [Kotlin](src/main/kotlin/g0001_0100/s0031_next_permutation) [TypeScript](src/main/ts/g0001_0100/s0031_next_permutation) [Scala](src/main/scala/g0001_0100/s0031_next_permutation) [Ruby](src/main/ruby/g0001_0100/s0031_next_permutation) [PHP](src/main/php/g0001_0100/s0031_next_permutation) [C#](src/main/csharp/g0001_0100/s0031_next_permutation) [Go](src/main/go/g0001_0100/s0031_next_permutation) [Cpp](src/main/cpp/g0001_0100/s0031_next_permutation) [Python](src/main/python/g0001_0100/s0031_next_permutation) [Swift](src/main/swift/g0001_0100/s0031_next_permutation) [Elixir](src/main/elixir/g0001_0100/s0031_next_permutation)| Medium | Top_100_Liked_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 47 | 99.30 -| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Data_Structure_II_Day_13_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 -| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Data_Structure_II_Day_12_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 -| 0023 |Merge k Sorted Lists| [Java](src/main/java/g0001_0100/s0023_merge_k_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0023_merge_k_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0023_merge_k_sorted_lists) [Scala](src/main/scala/g0001_0100/s0023_merge_k_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0023_merge_k_sorted_lists) [PHP](src/main/php/g0001_0100/s0023_merge_k_sorted_lists) [C#](src/main/csharp/g0001_0100/s0023_merge_k_sorted_lists) [Go](src/main/go/g0001_0100/s0023_merge_k_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0023_merge_k_sorted_lists) [Python](src/main/python/g0001_0100/s0023_merge_k_sorted_lists) [Swift](src/main/swift/g0001_0100/s0023_merge_k_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0023_merge_k_sorted_lists)| 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)) | 76 | 94.52 -| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 -| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Data_Structure_I_Day_7_Linked_List, Algorithm_I_Day_10_Recursion_Backtracking, Level_1_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(m+n)_Space_O(m+n) | 59 | 86.77 -| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Data_Structure_I_Day_9_Stack_Queue, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 -| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Algorithm_I_Day_5_Two_Pointers, Level_2_Day_3_Linked_List, Big_O_Time_O(L)_Space_O(L) | 54 | 87.87 -| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 -| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Data_Structure_II_Day_1_Array, Algorithm_II_Day_3_Two_Pointers, Udemy_Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 -| 0011 |Container With Most Water| [Java](src/main/java/g0001_0100/s0011_container_with_most_water) [Kotlin](src/main/kotlin/g0001_0100/s0011_container_with_most_water) [TypeScript](src/main/ts/g0001_0100/s0011_container_with_most_water) [Scala](src/main/scala/g0001_0100/s0011_container_with_most_water) [Ruby](src/main/ruby/g0001_0100/s0011_container_with_most_water) [PHP](src/main/php/g0001_0100/s0011_container_with_most_water) [C#](src/main/csharp/g0001_0100/s0011_container_with_most_water) [Go](src/main/go/g0001_0100/s0011_container_with_most_water) [Cpp](src/main/cpp/g0001_0100/s0011_container_with_most_water) [Python](src/main/python/g0001_0100/s0011_container_with_most_water) [Swift](src/main/swift/g0001_0100/s0011_container_with_most_water) [Elixir](src/main/elixir/g0001_0100/s0011_container_with_most_water)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Greedy, Two_Pointers, Algorithm_II_Day_4_Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 57 | 98.23 -| 0010 |Regular Expression Matching| [Java](src/main/java/g0001_0100/s0010_regular_expression_matching) [Kotlin](src/main/kotlin/g0001_0100/s0010_regular_expression_matching) [TypeScript](src/main/ts/g0001_0100/s0010_regular_expression_matching) [Scala](src/main/scala/g0001_0100/s0010_regular_expression_matching) [Ruby](src/main/ruby/g0001_0100/s0010_regular_expression_matching) [PHP](src/main/php/g0001_0100/s0010_regular_expression_matching) [C#](src/main/csharp/g0001_0100/s0010_regular_expression_matching) [Go](src/main/go/g0001_0100/s0010_regular_expression_matching) [Cpp](src/main/cpp/g0001_0100/s0010_regular_expression_matching) [Python](src/main/python/g0001_0100/s0010_regular_expression_matching) [Swift](src/main/swift/g0001_0100/s0010_regular_expression_matching) [Elixir](src/main/elixir/g0001_0100/s0010_regular_expression_matching)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Recursion, Udemy_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 69 | 92.65 -| 0009 |Palindrome Number| [Java](src/main/java/g0001_0100/s0009_palindrome_number) [Kotlin](src/main/kotlin/g0001_0100/s0009_palindrome_number) [TypeScript](src/main/ts/g0001_0100/s0009_palindrome_number) [Scala](src/main/scala/g0001_0100/s0009_palindrome_number) [Ruby](src/main/ruby/g0001_0100/s0009_palindrome_number) [PHP](src/main/php/g0001_0100/s0009_palindrome_number) [C#](src/main/csharp/g0001_0100/s0009_palindrome_number) [Go](src/main/go/g0001_0100/s0009_palindrome_number) [Cpp](src/main/cpp/g0001_0100/s0009_palindrome_number) [Python](src/main/python/g0001_0100/s0009_palindrome_number) [Swift](src/main/swift/g0001_0100/s0009_palindrome_number) [Elixir](src/main/elixir/g0001_0100/s0009_palindrome_number)| Easy | Math, Udemy_Integers | 137 | 88.64 -| 0008 |String to Integer (atoi)| [Java](src/main/java/g0001_0100/s0008_string_to_integer_atoi) [Kotlin](src/main/kotlin/g0001_0100/s0008_string_to_integer_atoi) [TypeScript](src/main/ts/g0001_0100/s0008_string_to_integer_atoi) [Scala](src/main/scala/g0001_0100/s0008_string_to_integer_atoi) [Ruby](src/main/ruby/g0001_0100/s0008_string_to_integer_atoi) [PHP](src/main/php/g0001_0100/s0008_string_to_integer_atoi) [C#](src/main/csharp/g0001_0100/s0008_string_to_integer_atoi) [Go](src/main/go/g0001_0100/s0008_string_to_integer_atoi) [Cpp](src/main/cpp/g0001_0100/s0008_string_to_integer_atoi) [Python](src/main/python/g0001_0100/s0008_string_to_integer_atoi) [Swift](src/main/swift/g0001_0100/s0008_string_to_integer_atoi) [Elixir](src/main/elixir/g0001_0100/s0008_string_to_integer_atoi)| Medium | Top_Interview_Questions, String | 56 | 99.01 -| 0007 |Reverse Integer| [Java](src/main/java/g0001_0100/s0007_reverse_integer) [Kotlin](src/main/kotlin/g0001_0100/s0007_reverse_integer) [TypeScript](src/main/ts/g0001_0100/s0007_reverse_integer) [Scala](src/main/scala/g0001_0100/s0007_reverse_integer) [Ruby](src/main/ruby/g0001_0100/s0007_reverse_integer) [PHP](src/main/php/g0001_0100/s0007_reverse_integer) [C#](src/main/csharp/g0001_0100/s0007_reverse_integer) [Go](src/main/go/g0001_0100/s0007_reverse_integer) [Cpp](src/main/cpp/g0001_0100/s0007_reverse_integer) [Python](src/main/python/g0001_0100/s0007_reverse_integer) [Swift](src/main/swift/g0001_0100/s0007_reverse_integer) [Elixir](src/main/elixir/g0001_0100/s0007_reverse_integer)| Medium | Top_Interview_Questions, Math, Udemy_Integers | 56 | 95.68 -| 0006 |Zigzag Conversion| [Java](src/main/java/g0001_0100/s0006_zigzag_conversion) [Kotlin](src/main/kotlin/g0001_0100/s0006_zigzag_conversion) [TypeScript](src/main/ts/g0001_0100/s0006_zigzag_conversion) [Scala](src/main/scala/g0001_0100/s0006_zigzag_conversion) [Ruby](src/main/ruby/g0001_0100/s0006_zigzag_conversion) [PHP](src/main/php/g0001_0100/s0006_zigzag_conversion) [C#](src/main/csharp/g0001_0100/s0006_zigzag_conversion) [Go](src/main/go/g0001_0100/s0006_zigzag_conversion) [Cpp](src/main/cpp/g0001_0100/s0006_zigzag_conversion) [Python](src/main/python/g0001_0100/s0006_zigzag_conversion) [Swift](src/main/swift/g0001_0100/s0006_zigzag_conversion) [Elixir](src/main/elixir/g0001_0100/s0006_zigzag_conversion)| Medium | String | 64 | 95.38 -| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Data_Structure_II_Day_9_String, Algorithm_II_Day_14_Dynamic_Programming, Dynamic_Programming_I_Day_17, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 -| 0004 |Median of Two Sorted Arrays| [Java](src/main/java/g0001_0100/s0004_median_of_two_sorted_arrays) [Kotlin](src/main/kotlin/g0001_0100/s0004_median_of_two_sorted_arrays) [TypeScript](src/main/ts/g0001_0100/s0004_median_of_two_sorted_arrays) [Scala](src/main/scala/g0001_0100/s0004_median_of_two_sorted_arrays) [Ruby](src/main/ruby/g0001_0100/s0004_median_of_two_sorted_arrays) [PHP](src/main/php/g0001_0100/s0004_median_of_two_sorted_arrays) [C#](src/main/csharp/g0001_0100/s0004_median_of_two_sorted_arrays) [Go](src/main/go/g0001_0100/s0004_median_of_two_sorted_arrays) [Cpp](src/main/cpp/g0001_0100/s0004_median_of_two_sorted_arrays) [Python](src/main/python/g0001_0100/s0004_median_of_two_sorted_arrays) [Swift](src/main/swift/g0001_0100/s0004_median_of_two_sorted_arrays) [Elixir](src/main/elixir/g0001_0100/s0004_median_of_two_sorted_arrays)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Divide_and_Conquer, Big_O_Time_O(log(min(N,M)))_Space_O(1) | 86 | 92.15 -| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Algorithm_I_Day_6_Sliding_Window, Level_2_Day_14_Sliding_Window/Two_Pointer, Udemy_Strings, Big_O_Time_O(n)_Space_O(1) | 65 | 90.77 -| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Data_Structure_II_Day_10_Linked_List, Programming_Skills_II_Day_15, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 -| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Data_Structure_I_Day_2_Array, Level_1_Day_13_Hashmap, Udemy_Arrays, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 +| 1143 |Longest Common Subsequence| [Java](src/main/java/g1101_1200/s1143_longest_common_subsequence) [Kotlin](src/main/kotlin/g1101_1200/s1143_longest_common_subsequence) [TypeScript](src/main/ts/g1101_1200/s1143_longest_common_subsequence) [Scala](src/main/scala/g1101_1200/s1143_longest_common_subsequence) [Ruby](src/main/ruby/g1101_1200/s1143_longest_common_subsequence) [PHP](src/main/php/g1101_1200/s1143_longest_common_subsequence) [C#](src/main/csharp/g1101_1200/s1143_longest_common_subsequence) [Go](src/main/go/g1101_1200/s1143_longest_common_subsequence) [Cpp](src/main/cpp/g1101_1200/s1143_longest_common_subsequence) [Python](src/main/python/g1101_1200/s1143_longest_common_subsequence) [Swift](src/main/swift/g1101_1200/s1143_longest_common_subsequence) [Elixir](src/main/elixir/g1101_1200/s1143_longest_common_subsequence) [Rust](src/main/rust/g1101_1200/s1143_longest_common_subsequence)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Algorithm_II_Day_17_Dynamic_Programming, Dynamic_Programming_I_Day_19, Udemy_Dynamic_Programming, Big_O_Time_O(n\*m)_Space_O(n\*m) | 94 | 80.56 +| 0763 |Partition Labels| [Java](src/main/java/g0701_0800/s0763_partition_labels) [Kotlin](src/main/kotlin/g0701_0800/s0763_partition_labels) [TypeScript](src/main/ts/g0701_0800/s0763_partition_labels) [Scala](src/main/scala/g0701_0800/s0763_partition_labels) [Ruby](src/main/ruby/g0701_0800/s0763_partition_labels) [PHP](src/main/php/g0701_0800/s0763_partition_labels) [C#](src/main/csharp/g0701_0800/s0763_partition_labels) [Go](src/main/go/g0701_0800/s0763_partition_labels) [Cpp](src/main/cpp/g0701_0800/s0763_partition_labels) [Python](src/main/python/g0701_0800/s0763_partition_labels) [Swift](src/main/swift/g0701_0800/s0763_partition_labels) [Elixir](src/main/elixir/g0701_0800/s0763_partition_labels) [Rust](src/main/rust/g0701_0800/s0763_partition_labels)| 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) | 54 | 94.74 +| 0739 |Daily Temperatures| [Java](src/main/java/g0701_0800/s0739_daily_temperatures) [Kotlin](src/main/kotlin/g0701_0800/s0739_daily_temperatures) [TypeScript](src/main/ts/g0701_0800/s0739_daily_temperatures) [Scala](src/main/scala/g0701_0800/s0739_daily_temperatures) [Ruby](src/main/ruby/g0701_0800/s0739_daily_temperatures) [PHP](src/main/php/g0701_0800/s0739_daily_temperatures) [C#](src/main/csharp/g0701_0800/s0739_daily_temperatures) [Go](src/main/go/g0701_0800/s0739_daily_temperatures) [Cpp](src/main/cpp/g0701_0800/s0739_daily_temperatures) [Python](src/main/python/g0701_0800/s0739_daily_temperatures) [Swift](src/main/swift/g0701_0800/s0739_daily_temperatures) [Elixir](src/main/elixir/g0701_0800/s0739_daily_temperatures) [Rust](src/main/rust/g0701_0800/s0739_daily_temperatures)| Medium | Top_100_Liked_Questions, Array, Stack, Monotonic_Stack, Programming_Skills_II_Day_6, Big_O_Time_O(n)_Space_O(n) | 194 | 97.36 +| 0647 |Palindromic Substrings| [Java](src/main/java/g0601_0700/s0647_palindromic_substrings) [Kotlin](src/main/kotlin/g0601_0700/s0647_palindromic_substrings) [TypeScript](src/main/ts/g0601_0700/s0647_palindromic_substrings) [Scala](src/main/scala/g0601_0700/s0647_palindromic_substrings) [Ruby](src/main/ruby/g0601_0700/s0647_palindromic_substrings) [PHP](src/main/php/g0601_0700/s0647_palindromic_substrings) [C#](src/main/csharp/g0601_0700/s0647_palindromic_substrings) [Go](src/main/go/g0601_0700/s0647_palindromic_substrings) [Cpp](src/main/cpp/g0601_0700/s0647_palindromic_substrings) [Python](src/main/python/g0601_0700/s0647_palindromic_substrings) [Swift](src/main/swift/g0601_0700/s0647_palindromic_substrings) [Elixir](src/main/elixir/g0601_0700/s0647_palindromic_substrings) [Rust](src/main/rust/g0601_0700/s0647_palindromic_substrings)| Medium | Top_100_Liked_Questions, String, Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n) | 60 | 89.76 +| 0560 |Subarray Sum Equals K| [Java](src/main/java/g0501_0600/s0560_subarray_sum_equals_k) [Kotlin](src/main/kotlin/g0501_0600/s0560_subarray_sum_equals_k) [TypeScript](src/main/ts/g0501_0600/s0560_subarray_sum_equals_k) [Scala](src/main/scala/g0501_0600/s0560_subarray_sum_equals_k) [Ruby](src/main/ruby/g0501_0600/s0560_subarray_sum_equals_k) [PHP](src/main/php/g0501_0600/s0560_subarray_sum_equals_k) [C#](src/main/csharp/g0501_0600/s0560_subarray_sum_equals_k) [Go](src/main/go/g0501_0600/s0560_subarray_sum_equals_k) [Cpp](src/main/cpp/g0501_0600/s0560_subarray_sum_equals_k) [Python](src/main/python/g0501_0600/s0560_subarray_sum_equals_k) [Swift](src/main/swift/g0501_0600/s0560_subarray_sum_equals_k) [Elixir](src/main/elixir/g0501_0600/s0560_subarray_sum_equals_k) [Rust](src/main/rust/g0501_0600/s0560_subarray_sum_equals_k)| Medium | Top_100_Liked_Questions, Array, Hash_Table, Prefix_Sum, Data_Structure_II_Day_5_Array, Big_O_Time_O(n)_Space_O(n) | 70 | 92.45 +| 0543 |Diameter of Binary Tree| [Java](src/main/java/g0501_0600/s0543_diameter_of_binary_tree) [Kotlin](src/main/kotlin/g0501_0600/s0543_diameter_of_binary_tree) [TypeScript](src/main/ts/g0501_0600/s0543_diameter_of_binary_tree) [Scala](src/main/scala/g0501_0600/s0543_diameter_of_binary_tree) [Ruby](src/main/ruby/g0501_0600/s0543_diameter_of_binary_tree) [PHP](src/main/php/g0501_0600/s0543_diameter_of_binary_tree) [C#](src/main/csharp/g0501_0600/s0543_diameter_of_binary_tree) [Go](src/main/go/g0501_0600/s0543_diameter_of_binary_tree) [Cpp](src/main/cpp/g0501_0600/s0543_diameter_of_binary_tree) [Python](src/main/python/g0501_0600/s0543_diameter_of_binary_tree) [Swift](src/main/swift/g0501_0600/s0543_diameter_of_binary_tree) [Elixir](src/main/elixir/g0501_0600/s0543_diameter_of_binary_tree) [Rust](src/main/rust/g0501_0600/s0543_diameter_of_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Level_2_Day_7_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 61 | 80.89 +| 0494 |Target Sum| [Java](src/main/java/g0401_0500/s0494_target_sum) [Kotlin](src/main/kotlin/g0401_0500/s0494_target_sum) [TypeScript](src/main/ts/g0401_0500/s0494_target_sum) [Scala](src/main/scala/g0401_0500/s0494_target_sum) [Ruby](src/main/ruby/g0401_0500/s0494_target_sum) [PHP](src/main/php/g0401_0500/s0494_target_sum) [C#](src/main/csharp/g0401_0500/s0494_target_sum) [Go](src/main/go/g0401_0500/s0494_target_sum) [Cpp](src/main/cpp/g0401_0500/s0494_target_sum) [Python](src/main/python/g0401_0500/s0494_target_sum) [Swift](src/main/swift/g0401_0500/s0494_target_sum) [Elixir](src/main/elixir/g0401_0500/s0494_target_sum) [Rust](src/main/rust/g0401_0500/s0494_target_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Backtracking, Big_O_Time_O(n\*(sum+s))_Space_O(n\*(sum+s)) | 77 | 81.99 +| 0438 |Find All Anagrams in a String| [Java](src/main/java/g0401_0500/s0438_find_all_anagrams_in_a_string) [Kotlin](src/main/kotlin/g0401_0500/s0438_find_all_anagrams_in_a_string) [TypeScript](src/main/ts/g0401_0500/s0438_find_all_anagrams_in_a_string) [Scala](src/main/scala/g0401_0500/s0438_find_all_anagrams_in_a_string) [Ruby](src/main/ruby/g0401_0500/s0438_find_all_anagrams_in_a_string) [PHP](src/main/php/g0401_0500/s0438_find_all_anagrams_in_a_string) [C#](src/main/csharp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Go](src/main/go/g0401_0500/s0438_find_all_anagrams_in_a_string) [Cpp](src/main/cpp/g0401_0500/s0438_find_all_anagrams_in_a_string) [Python](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string) [Swift](src/main/swift/g0401_0500/s0438_find_all_anagrams_in_a_string) [Elixir](src/main/elixir/g0401_0500/s0438_find_all_anagrams_in_a_string) [Rust](src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Algorithm_II_Day_5_Sliding_Window, Programming_Skills_II_Day_12, Level_1_Day_12_Sliding_Window/Two_Pointer, Big_O_Time_O(n+m)_Space_O(1) | 69 | 96.69 +| 0437 |Path Sum III| [Java](src/main/java/g0401_0500/s0437_path_sum_iii) [Kotlin](src/main/kotlin/g0401_0500/s0437_path_sum_iii) [TypeScript](src/main/ts/g0401_0500/s0437_path_sum_iii) [Scala](src/main/scala/g0401_0500/s0437_path_sum_iii) [Ruby](src/main/ruby/g0401_0500/s0437_path_sum_iii) [PHP](src/main/php/g0401_0500/s0437_path_sum_iii) [C#](src/main/csharp/g0401_0500/s0437_path_sum_iii) [Go](src/main/go/g0401_0500/s0437_path_sum_iii) [Cpp](src/main/cpp/g0401_0500/s0437_path_sum_iii) [Python](src/main/python/g0401_0500/s0437_path_sum_iii) [Swift](src/main/swift/g0401_0500/s0437_path_sum_iii) [Elixir](src/main/elixir/g0401_0500/s0437_path_sum_iii) [Rust](src/main/rust/g0401_0500/s0437_path_sum_iii)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Level_2_Day_7_Tree, Big_O_Time_O(n)_Space_O(n) | 68 | 86.71 +| 0416 |Partition Equal Subset Sum| [Java](src/main/java/g0401_0500/s0416_partition_equal_subset_sum) [Kotlin](src/main/kotlin/g0401_0500/s0416_partition_equal_subset_sum) [TypeScript](src/main/ts/g0401_0500/s0416_partition_equal_subset_sum) [Scala](src/main/scala/g0401_0500/s0416_partition_equal_subset_sum) [Ruby](src/main/ruby/g0401_0500/s0416_partition_equal_subset_sum) [PHP](src/main/php/g0401_0500/s0416_partition_equal_subset_sum) [C#](src/main/csharp/g0401_0500/s0416_partition_equal_subset_sum) [Go](src/main/go/g0401_0500/s0416_partition_equal_subset_sum) [Cpp](src/main/cpp/g0401_0500/s0416_partition_equal_subset_sum) [Python](src/main/python/g0401_0500/s0416_partition_equal_subset_sum) [Swift](src/main/swift/g0401_0500/s0416_partition_equal_subset_sum) [Elixir](src/main/elixir/g0401_0500/s0416_partition_equal_subset_sum) [Rust](src/main/rust/g0401_0500/s0416_partition_equal_subset_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Level_2_Day_13_Dynamic_Programming, Big_O_Time_O(n\*sums)_Space_O(n\*sums) | 91 | 74.38 +| 0394 |Decode String| [Java](src/main/java/g0301_0400/s0394_decode_string) [Kotlin](src/main/kotlin/g0301_0400/s0394_decode_string) [TypeScript](src/main/ts/g0301_0400/s0394_decode_string) [Scala](src/main/scala/g0301_0400/s0394_decode_string) [Ruby](src/main/ruby/g0301_0400/s0394_decode_string) [PHP](src/main/php/g0301_0400/s0394_decode_string) [C#](src/main/csharp/g0301_0400/s0394_decode_string) [Go](src/main/go/g0301_0400/s0394_decode_string) [Cpp](src/main/cpp/g0301_0400/s0394_decode_string) [Python](src/main/python/g0301_0400/s0394_decode_string) [Swift](src/main/swift/g0301_0400/s0394_decode_string) [Elixir](src/main/elixir/g0301_0400/s0394_decode_string) [Rust](src/main/rust/g0301_0400/s0394_decode_string)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, Level_1_Day_14_Stack, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 51 | 81.02 +| 0347 |Top K Frequent Elements| [Java](src/main/java/g0301_0400/s0347_top_k_frequent_elements) [Kotlin](src/main/kotlin/g0301_0400/s0347_top_k_frequent_elements) [TypeScript](src/main/ts/g0301_0400/s0347_top_k_frequent_elements) [Scala](src/main/scala/g0301_0400/s0347_top_k_frequent_elements) [Ruby](src/main/ruby/g0301_0400/s0347_top_k_frequent_elements) [PHP](src/main/php/g0301_0400/s0347_top_k_frequent_elements) [C#](src/main/csharp/g0301_0400/s0347_top_k_frequent_elements) [Go](src/main/go/g0301_0400/s0347_top_k_frequent_elements) [Cpp](src/main/cpp/g0301_0400/s0347_top_k_frequent_elements) [Python](src/main/python/g0301_0400/s0347_top_k_frequent_elements) [Swift](src/main/swift/g0301_0400/s0347_top_k_frequent_elements) [Elixir](src/main/elixir/g0301_0400/s0347_top_k_frequent_elements) [Rust](src/main/rust/g0301_0400/s0347_top_k_frequent_elements)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Divide_and_Conquer, Quickselect, Bucket_Sort, Data_Structure_II_Day_20_Heap_Priority_Queue, Big_O_Time_O(n\*log(n))_Space_O(k) | 62 | 87.48 +| 0338 |Counting Bits| [Java](src/main/java/g0301_0400/s0338_counting_bits) [Kotlin](src/main/kotlin/g0301_0400/s0338_counting_bits) [TypeScript](src/main/ts/g0301_0400/s0338_counting_bits) [Scala](src/main/scala/g0301_0400/s0338_counting_bits) [Ruby](src/main/ruby/g0301_0400/s0338_counting_bits) [PHP](src/main/php/g0301_0400/s0338_counting_bits) [C#](src/main/csharp/g0301_0400/s0338_counting_bits) [Go](src/main/go/g0301_0400/s0338_counting_bits) [Cpp](src/main/cpp/g0301_0400/s0338_counting_bits) [Python](src/main/python/g0301_0400/s0338_counting_bits) [Swift](src/main/swift/g0301_0400/s0338_counting_bits) [Elixir](src/main/elixir/g0301_0400/s0338_counting_bits) [Rust](src/main/rust/g0301_0400/s0338_counting_bits)| Easy | Top_100_Liked_Questions, Dynamic_Programming, Bit_Manipulation, Udemy_Bit_Manipulation, Big_O_Time_O(num)_Space_O(num) | 69 | 86.81 +| 0322 |Coin Change| [Java](src/main/java/g0301_0400/s0322_coin_change) [Kotlin](src/main/kotlin/g0301_0400/s0322_coin_change) [TypeScript](src/main/ts/g0301_0400/s0322_coin_change) [Scala](src/main/scala/g0301_0400/s0322_coin_change) [Ruby](src/main/ruby/g0301_0400/s0322_coin_change) [PHP](src/main/php/g0301_0400/s0322_coin_change) [C#](src/main/csharp/g0301_0400/s0322_coin_change) [Go](src/main/go/g0301_0400/s0322_coin_change) [Cpp](src/main/cpp/g0301_0400/s0322_coin_change) [Python](src/main/python/g0301_0400/s0322_coin_change) [Swift](src/main/swift/g0301_0400/s0322_coin_change) [Elixir](src/main/elixir/g0301_0400/s0322_coin_change) [Rust](src/main/rust/g0301_0400/s0322_coin_change)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Breadth_First_Search, Algorithm_II_Day_18_Dynamic_Programming, Dynamic_Programming_I_Day_20, Level_2_Day_12_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(amount) | 85 | 86.14 +| 0300 |Longest Increasing Subsequence| [Java](src/main/java/g0201_0300/s0300_longest_increasing_subsequence) [Kotlin](src/main/kotlin/g0201_0300/s0300_longest_increasing_subsequence) [TypeScript](src/main/ts/g0201_0300/s0300_longest_increasing_subsequence) [Scala](src/main/scala/g0201_0300/s0300_longest_increasing_subsequence) [Ruby](src/main/ruby/g0201_0300/s0300_longest_increasing_subsequence) [PHP](src/main/php/g0201_0300/s0300_longest_increasing_subsequence) [C#](src/main/csharp/g0201_0300/s0300_longest_increasing_subsequence) [Go](src/main/go/g0201_0300/s0300_longest_increasing_subsequence) [Cpp](src/main/cpp/g0201_0300/s0300_longest_increasing_subsequence) [Python](src/main/python/g0201_0300/s0300_longest_increasing_subsequence) [Swift](src/main/swift/g0201_0300/s0300_longest_increasing_subsequence) [Elixir](src/main/elixir/g0201_0300/s0300_longest_increasing_subsequence) [Rust](src/main/rust/g0201_0300/s0300_longest_increasing_subsequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Binary_Search, Algorithm_II_Day_16_Dynamic_Programming, Binary_Search_II_Day_3, Dynamic_Programming_I_Day_18, Udemy_Dynamic_Programming, Big_O_Time_O(n\*log_n)_Space_O(n) | 57 | 93.75 +| 0295 |Find Median from Data Stream| [Java](src/main/java/g0201_0300/s0295_find_median_from_data_stream) [Kotlin](src/main/kotlin/g0201_0300/s0295_find_median_from_data_stream) [TypeScript](src/main/ts/g0201_0300/s0295_find_median_from_data_stream) [Scala](src/main/scala/g0201_0300/s0295_find_median_from_data_stream) [Ruby](src/main/ruby/g0201_0300/s0295_find_median_from_data_stream) [PHP](src/main/php/g0201_0300/s0295_find_median_from_data_stream) [C#](src/main/csharp/g0201_0300/s0295_find_median_from_data_stream) [Go](src/main/go/g0201_0300/s0295_find_median_from_data_stream) [Cpp](src/main/cpp/g0201_0300/s0295_find_median_from_data_stream) [Python](src/main/python/g0201_0300/s0295_find_median_from_data_stream) [Swift](src/main/swift/g0201_0300/s0295_find_median_from_data_stream) [Elixir](src/main/elixir/g0201_0300/s0295_find_median_from_data_stream) [Rust](src/main/rust/g0201_0300/s0295_find_median_from_data_stream)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Sorting, Two_Pointers, Design, Heap_Priority_Queue, Data_Stream, Big_O_Time_O(n\*log_n)_Space_O(n) | 335 | 99.44 +| 0287 |Find the Duplicate Number| [Java](src/main/java/g0201_0300/s0287_find_the_duplicate_number) [Kotlin](src/main/kotlin/g0201_0300/s0287_find_the_duplicate_number) [TypeScript](src/main/ts/g0201_0300/s0287_find_the_duplicate_number) [Scala](src/main/scala/g0201_0300/s0287_find_the_duplicate_number) [Ruby](src/main/ruby/g0201_0300/s0287_find_the_duplicate_number) [PHP](src/main/php/g0201_0300/s0287_find_the_duplicate_number) [C#](src/main/csharp/g0201_0300/s0287_find_the_duplicate_number) [Go](src/main/go/g0201_0300/s0287_find_the_duplicate_number) [Cpp](src/main/cpp/g0201_0300/s0287_find_the_duplicate_number) [Python](src/main/python/g0201_0300/s0287_find_the_duplicate_number) [Swift](src/main/swift/g0201_0300/s0287_find_the_duplicate_number) [Elixir](src/main/elixir/g0201_0300/s0287_find_the_duplicate_number) [Rust](src/main/rust/g0201_0300/s0287_find_the_duplicate_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Two_Pointers, Bit_Manipulation, Binary_Search_II_Day_5, Big_O_Time_O(n)_Space_O(n) | 60 | 98.11 +| 0283 |Move Zeroes| [Java](src/main/java/g0201_0300/s0283_move_zeroes) [Kotlin](src/main/kotlin/g0201_0300/s0283_move_zeroes) [TypeScript](src/main/ts/g0201_0300/s0283_move_zeroes) [Scala](src/main/scala/g0201_0300/s0283_move_zeroes) [Ruby](src/main/ruby/g0201_0300/s0283_move_zeroes) [PHP](src/main/php/g0201_0300/s0283_move_zeroes) [C#](src/main/csharp/g0201_0300/s0283_move_zeroes) [Go](src/main/go/g0201_0300/s0283_move_zeroes) [Cpp](src/main/cpp/g0201_0300/s0283_move_zeroes) [Python](src/main/python/g0201_0300/s0283_move_zeroes) [Swift](src/main/swift/g0201_0300/s0283_move_zeroes) [Elixir](src/main/elixir/g0201_0300/s0283_move_zeroes) [Rust](src/main/rust/g0201_0300/s0283_move_zeroes)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Two_Pointers, Algorithm_I_Day_3_Two_Pointers, Programming_Skills_I_Day_6_Array, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 71 | 91.63 +| 0240 |Search a 2D Matrix II| [Java](src/main/java/g0201_0300/s0240_search_a_2d_matrix_ii) [Kotlin](src/main/kotlin/g0201_0300/s0240_search_a_2d_matrix_ii) [TypeScript](src/main/ts/g0201_0300/s0240_search_a_2d_matrix_ii) [Scala](src/main/scala/g0201_0300/s0240_search_a_2d_matrix_ii) [Ruby](src/main/ruby/g0201_0300/s0240_search_a_2d_matrix_ii) [PHP](src/main/php/g0201_0300/s0240_search_a_2d_matrix_ii) [C#](src/main/csharp/g0201_0300/s0240_search_a_2d_matrix_ii) [Go](src/main/go/g0201_0300/s0240_search_a_2d_matrix_ii) [Cpp](src/main/cpp/g0201_0300/s0240_search_a_2d_matrix_ii) [Python](src/main/python/g0201_0300/s0240_search_a_2d_matrix_ii) [Swift](src/main/swift/g0201_0300/s0240_search_a_2d_matrix_ii) [Elixir](src/main/elixir/g0201_0300/s0240_search_a_2d_matrix_ii) [Rust](src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Matrix, Divide_and_Conquer, Data_Structure_II_Day_4_Array, Binary_Search_II_Day_8, Big_O_Time_O(n+m)_Space_O(1) | 58 | 64.44 +| 0239 |Sliding Window Maximum| [Java](src/main/java/g0201_0300/s0239_sliding_window_maximum) [Kotlin](src/main/kotlin/g0201_0300/s0239_sliding_window_maximum) [TypeScript](src/main/ts/g0201_0300/s0239_sliding_window_maximum) [Scala](src/main/scala/g0201_0300/s0239_sliding_window_maximum) [Ruby](src/main/ruby/g0201_0300/s0239_sliding_window_maximum) [PHP](src/main/php/g0201_0300/s0239_sliding_window_maximum) [C#](src/main/csharp/g0201_0300/s0239_sliding_window_maximum) [Go](src/main/go/g0201_0300/s0239_sliding_window_maximum) [Cpp](src/main/cpp/g0201_0300/s0239_sliding_window_maximum) [Python](src/main/python/g0201_0300/s0239_sliding_window_maximum) [Swift](src/main/swift/g0201_0300/s0239_sliding_window_maximum) [Elixir](src/main/elixir/g0201_0300/s0239_sliding_window_maximum) [Rust](src/main/rust/g0201_0300/s0239_sliding_window_maximum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Heap_Priority_Queue, Sliding_Window, Queue, Monotonic_Queue, Udemy_Arrays, Big_O_Time_O(n\*k)_Space_O(n+k) | 216 | 99.50 +| 0238 |Product of Array Except Self| [Java](src/main/java/g0201_0300/s0238_product_of_array_except_self) [Kotlin](src/main/kotlin/g0201_0300/s0238_product_of_array_except_self) [TypeScript](src/main/ts/g0201_0300/s0238_product_of_array_except_self) [Scala](src/main/scala/g0201_0300/s0238_product_of_array_except_self) [Ruby](src/main/ruby/g0201_0300/s0238_product_of_array_except_self) [PHP](src/main/php/g0201_0300/s0238_product_of_array_except_self) [C#](src/main/csharp/g0201_0300/s0238_product_of_array_except_self) [Go](src/main/go/g0201_0300/s0238_product_of_array_except_self) [Cpp](src/main/cpp/g0201_0300/s0238_product_of_array_except_self) [Python](src/main/python/g0201_0300/s0238_product_of_array_except_self) [Swift](src/main/swift/g0201_0300/s0238_product_of_array_except_self) [Elixir](src/main/elixir/g0201_0300/s0238_product_of_array_except_self) [Rust](src/main/rust/g0201_0300/s0238_product_of_array_except_self)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Prefix_Sum, Data_Structure_II_Day_5_Array, Udemy_Arrays, Big_O_Time_O(n^2)_Space_O(n) | 89 | 64.48 +| 0236 |Lowest Common Ancestor of a Binary Tree| [Java](src/main/java/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Scala](src/main/scala/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [PHP](src/main/php/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [C#](src/main/csharp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Go](src/main/go/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Python](src/main/python/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Swift](src/main/swift/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree) [Rust](src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Data_Structure_II_Day_18_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 59 | 96.11 +| 0234 |Palindrome Linked List| [Java](src/main/java/g0201_0300/s0234_palindrome_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0234_palindrome_linked_list) [TypeScript](src/main/ts/g0201_0300/s0234_palindrome_linked_list) [Scala](src/main/scala/g0201_0300/s0234_palindrome_linked_list) [Ruby](src/main/ruby/g0201_0300/s0234_palindrome_linked_list) [PHP](src/main/php/g0201_0300/s0234_palindrome_linked_list) [C#](src/main/csharp/g0201_0300/s0234_palindrome_linked_list) [Go](src/main/go/g0201_0300/s0234_palindrome_linked_list) [Cpp](src/main/cpp/g0201_0300/s0234_palindrome_linked_list) [Python](src/main/python/g0201_0300/s0234_palindrome_linked_list) [Swift](src/main/swift/g0201_0300/s0234_palindrome_linked_list) [Elixir](src/main/elixir/g0201_0300/s0234_palindrome_linked_list) [Rust](src/main/rust/g0201_0300/s0234_palindrome_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Stack, Linked_List, Recursion, Level_2_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(1) | 96 | 95.67 +| 0230 |Kth Smallest Element in a BST| [Java](src/main/java/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Kotlin](src/main/kotlin/g0201_0300/s0230_kth_smallest_element_in_a_bst) [TypeScript](src/main/ts/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Scala](src/main/scala/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Ruby](src/main/ruby/g0201_0300/s0230_kth_smallest_element_in_a_bst) [PHP](src/main/php/g0201_0300/s0230_kth_smallest_element_in_a_bst) [C#](src/main/csharp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Go](src/main/go/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Cpp](src/main/cpp/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Python](src/main/python/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Swift](src/main/swift/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Elixir](src/main/elixir/g0201_0300/s0230_kth_smallest_element_in_a_bst) [Rust](src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Data_Structure_II_Day_17_Tree, Level_2_Day_9_Binary_Search_Tree, Big_O_Time_O(n)_Space_O(n) | 54 | 97.22 +| 0226 |Invert Binary Tree| [Java](src/main/java/g0201_0300/s0226_invert_binary_tree) [Kotlin](src/main/kotlin/g0201_0300/s0226_invert_binary_tree) [TypeScript](src/main/ts/g0201_0300/s0226_invert_binary_tree) [Scala](src/main/scala/g0201_0300/s0226_invert_binary_tree) [Ruby](src/main/ruby/g0201_0300/s0226_invert_binary_tree) [PHP](src/main/php/g0201_0300/s0226_invert_binary_tree) [C#](src/main/csharp/g0201_0300/s0226_invert_binary_tree) [Go](src/main/go/g0201_0300/s0226_invert_binary_tree) [Cpp](src/main/cpp/g0201_0300/s0226_invert_binary_tree) [Python](src/main/python/g0201_0300/s0226_invert_binary_tree) [Swift](src/main/swift/g0201_0300/s0226_invert_binary_tree) [Elixir](src/main/elixir/g0201_0300/s0226_invert_binary_tree) [Rust](src/main/rust/g0201_0300/s0226_invert_binary_tree)| Easy | Top_100_Liked_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_12_Tree, Level_2_Day_6_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 52 | 81.65 +| 0221 |Maximal Square| [Java](src/main/java/g0201_0300/s0221_maximal_square) [Kotlin](src/main/kotlin/g0201_0300/s0221_maximal_square) [TypeScript](src/main/ts/g0201_0300/s0221_maximal_square) [Scala](src/main/scala/g0201_0300/s0221_maximal_square) [Ruby](src/main/ruby/g0201_0300/s0221_maximal_square) [PHP](src/main/php/g0201_0300/s0221_maximal_square) [C#](src/main/csharp/g0201_0300/s0221_maximal_square) [Go](src/main/go/g0201_0300/s0221_maximal_square) [Cpp](src/main/cpp/g0201_0300/s0221_maximal_square) [Python](src/main/python/g0201_0300/s0221_maximal_square) [Swift](src/main/swift/g0201_0300/s0221_maximal_square) [Elixir](src/main/elixir/g0201_0300/s0221_maximal_square) [Rust](src/main/rust/g0201_0300/s0221_maximal_square)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Dynamic_Programming_I_Day_16, Big_O_Time_O(m\*n)_Space_O(m\*n) | 83 | 79.70 +| 0215 |Kth Largest Element in an Array| [Java](src/main/java/g0201_0300/s0215_kth_largest_element_in_an_array) [Kotlin](src/main/kotlin/g0201_0300/s0215_kth_largest_element_in_an_array) [TypeScript](src/main/ts/g0201_0300/s0215_kth_largest_element_in_an_array) [Scala](src/main/scala/g0201_0300/s0215_kth_largest_element_in_an_array) [Ruby](src/main/ruby/g0201_0300/s0215_kth_largest_element_in_an_array) [PHP](src/main/php/g0201_0300/s0215_kth_largest_element_in_an_array) [C#](src/main/csharp/g0201_0300/s0215_kth_largest_element_in_an_array) [Go](src/main/go/g0201_0300/s0215_kth_largest_element_in_an_array) [Cpp](src/main/cpp/g0201_0300/s0215_kth_largest_element_in_an_array) [Python](src/main/python/g0201_0300/s0215_kth_largest_element_in_an_array) [Swift](src/main/swift/g0201_0300/s0215_kth_largest_element_in_an_array) [Elixir](src/main/elixir/g0201_0300/s0215_kth_largest_element_in_an_array) [Rust](src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Heap_Priority_Queue, Divide_and_Conquer, Quickselect, Data_Structure_II_Day_20_Heap_Priority_Queue, Big_O_Time_O(n\*log(n))_Space_O(log(n)) | 148 | 54.45 +| 0208 |Implement Trie (Prefix Tree)| [Java](src/main/java/g0201_0300/s0208_implement_trie_prefix_tree) [Kotlin](src/main/kotlin/g0201_0300/s0208_implement_trie_prefix_tree) [TypeScript](src/main/ts/g0201_0300/s0208_implement_trie_prefix_tree) [Scala](src/main/scala/g0201_0300/s0208_implement_trie_prefix_tree) [Ruby](src/main/ruby/g0201_0300/s0208_implement_trie_prefix_tree) [PHP](src/main/php/g0201_0300/s0208_implement_trie_prefix_tree) [C#](src/main/csharp/g0201_0300/s0208_implement_trie_prefix_tree) [Go](src/main/go/g0201_0300/s0208_implement_trie_prefix_tree) [Cpp](src/main/cpp/g0201_0300/s0208_implement_trie_prefix_tree) [Python](src/main/python/g0201_0300/s0208_implement_trie_prefix_tree) [Swift](src/main/swift/g0201_0300/s0208_implement_trie_prefix_tree) [Elixir](src/main/elixir/g0201_0300/s0208_implement_trie_prefix_tree) [Rust](src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Design, Trie, Level_2_Day_16_Design, Udemy_Trie_and_Heap, Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) | 168 | 80.99 +| 0207 |Course Schedule| [Java](src/main/java/g0201_0300/s0207_course_schedule) [Kotlin](src/main/kotlin/g0201_0300/s0207_course_schedule) [TypeScript](src/main/ts/g0201_0300/s0207_course_schedule) [Scala](src/main/scala/g0201_0300/s0207_course_schedule) [Ruby](src/main/ruby/g0201_0300/s0207_course_schedule) [PHP](src/main/php/g0201_0300/s0207_course_schedule) [C#](src/main/csharp/g0201_0300/s0207_course_schedule) [Go](src/main/go/g0201_0300/s0207_course_schedule) [Cpp](src/main/cpp/g0201_0300/s0207_course_schedule) [Python](src/main/python/g0201_0300/s0207_course_schedule) [Swift](src/main/swift/g0201_0300/s0207_course_schedule) [Elixir](src/main/elixir/g0201_0300/s0207_course_schedule) [Rust](src/main/rust/g0201_0300/s0207_course_schedule)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Graph, Topological_Sort, Big_O_Time_O(N)_Space_O(N) | 68 | 70.14 +| 0206 |Reverse Linked List| [Java](src/main/java/g0201_0300/s0206_reverse_linked_list) [Kotlin](src/main/kotlin/g0201_0300/s0206_reverse_linked_list) [TypeScript](src/main/ts/g0201_0300/s0206_reverse_linked_list) [Scala](src/main/scala/g0201_0300/s0206_reverse_linked_list) [Ruby](src/main/ruby/g0201_0300/s0206_reverse_linked_list) [PHP](src/main/php/g0201_0300/s0206_reverse_linked_list) [C#](src/main/csharp/g0201_0300/s0206_reverse_linked_list) [Go](src/main/go/g0201_0300/s0206_reverse_linked_list) [Cpp](src/main/cpp/g0201_0300/s0206_reverse_linked_list) [Python](src/main/python/g0201_0300/s0206_reverse_linked_list) [Swift](src/main/swift/g0201_0300/s0206_reverse_linked_list) [Elixir](src/main/elixir/g0201_0300/s0206_reverse_linked_list) [Rust](src/main/rust/g0201_0300/s0206_reverse_linked_list)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Data_Structure_I_Day_8_Linked_List, Algorithm_I_Day_10_Recursion_Backtracking, Level_1_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 51 | 92.87 +| 0200 |Number of Islands| [Java](src/main/java/g0101_0200/s0200_number_of_islands) [Kotlin](src/main/kotlin/g0101_0200/s0200_number_of_islands) [TypeScript](src/main/ts/g0101_0200/s0200_number_of_islands) [Scala](src/main/scala/g0101_0200/s0200_number_of_islands) [Ruby](src/main/ruby/g0101_0200/s0200_number_of_islands) [PHP](src/main/php/g0101_0200/s0200_number_of_islands) [C#](src/main/csharp/g0101_0200/s0200_number_of_islands) [Go](src/main/go/g0101_0200/s0200_number_of_islands) [Cpp](src/main/cpp/g0101_0200/s0200_number_of_islands) [Python](src/main/python/g0101_0200/s0200_number_of_islands) [Swift](src/main/swift/g0101_0200/s0200_number_of_islands) [Elixir](src/main/elixir/g0101_0200/s0200_number_of_islands) [Rust](src/main/rust/g0101_0200/s0200_number_of_islands)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Depth_First_Search, Breadth_First_Search, Matrix, Union_Find, Algorithm_II_Day_6_Breadth_First_Search_Depth_First_Search, Graph_Theory_I_Day_1_Matrix_Related_Problems, Level_1_Day_9_Graph/BFS/DFS, Udemy_Graph, Big_O_Time_O(M\*N)_Space_O(M\*N) | 61 | 96.71 +| 0198 |House Robber| [Java](src/main/java/g0101_0200/s0198_house_robber) [Kotlin](src/main/kotlin/g0101_0200/s0198_house_robber) [TypeScript](src/main/ts/g0101_0200/s0198_house_robber) [Scala](src/main/scala/g0101_0200/s0198_house_robber) [Ruby](src/main/ruby/g0101_0200/s0198_house_robber) [PHP](src/main/php/g0101_0200/s0198_house_robber) [C#](src/main/csharp/g0101_0200/s0198_house_robber) [Go](src/main/go/g0101_0200/s0198_house_robber) [Cpp](src/main/cpp/g0101_0200/s0198_house_robber) [Python](src/main/python/g0101_0200/s0198_house_robber) [Swift](src/main/swift/g0101_0200/s0198_house_robber) [Elixir](src/main/elixir/g0101_0200/s0198_house_robber) [Rust](src/main/rust/g0101_0200/s0198_house_robber)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Algorithm_I_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_3, Level_2_Day_12_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 51 | 77.29 +| 0189 |Rotate Array| [Java](src/main/java/g0101_0200/s0189_rotate_array) [Kotlin](src/main/kotlin/g0101_0200/s0189_rotate_array) [TypeScript](src/main/ts/g0101_0200/s0189_rotate_array) [Scala](src/main/scala/g0101_0200/s0189_rotate_array) [Ruby](src/main/ruby/g0101_0200/s0189_rotate_array) [PHP](src/main/php/g0101_0200/s0189_rotate_array) [C#](src/main/csharp/g0101_0200/s0189_rotate_array) [Go](src/main/go/g0101_0200/s0189_rotate_array) [Cpp](src/main/cpp/g0101_0200/s0189_rotate_array) [Python](src/main/python/g0101_0200/s0189_rotate_array) [Swift](src/main/swift/g0101_0200/s0189_rotate_array) [Elixir](src/main/elixir/g0101_0200/s0189_rotate_array) [Rust](src/main/rust/g0101_0200/s0189_rotate_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Two_Pointers, Algorithm_I_Day_2_Two_Pointers, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 75 | 97.25 +| 0169 |Majority Element| [Java](src/main/java/g0101_0200/s0169_majority_element) [Kotlin](src/main/kotlin/g0101_0200/s0169_majority_element) [TypeScript](src/main/ts/g0101_0200/s0169_majority_element) [Scala](src/main/scala/g0101_0200/s0169_majority_element) [Ruby](src/main/ruby/g0101_0200/s0169_majority_element) [PHP](src/main/php/g0101_0200/s0169_majority_element) [C#](src/main/csharp/g0101_0200/s0169_majority_element) [Go](src/main/go/g0101_0200/s0169_majority_element) [Cpp](src/main/cpp/g0101_0200/s0169_majority_element) [Python](src/main/python/g0101_0200/s0169_majority_element) [Swift](src/main/swift/g0101_0200/s0169_majority_element) [Elixir](src/main/elixir/g0101_0200/s0169_majority_element) [Rust](src/main/rust/g0101_0200/s0169_majority_element)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Sorting, Counting, Divide_and_Conquer, Data_Structure_II_Day_1_Array, Udemy_Famous_Algorithm, Big_O_Time_O(n)_Space_O(1) | 50 | 96.16 +| 0160 |Intersection of Two Linked Lists| [Java](src/main/java/g0101_0200/s0160_intersection_of_two_linked_lists) [Kotlin](src/main/kotlin/g0101_0200/s0160_intersection_of_two_linked_lists) [TypeScript](src/main/ts/g0101_0200/s0160_intersection_of_two_linked_lists) [Scala](src/main/scala/g0101_0200/s0160_intersection_of_two_linked_lists) [Ruby](src/main/ruby/g0101_0200/s0160_intersection_of_two_linked_lists) [PHP](src/main/php/g0101_0200/s0160_intersection_of_two_linked_lists) [C#](src/main/csharp/g0101_0200/s0160_intersection_of_two_linked_lists) [Go](src/main/go/g0101_0200/s0160_intersection_of_two_linked_lists) [Cpp](src/main/cpp/g0101_0200/s0160_intersection_of_two_linked_lists) [Python](src/main/python/g0101_0200/s0160_intersection_of_two_linked_lists) [Swift](src/main/swift/g0101_0200/s0160_intersection_of_two_linked_lists) [Elixir](src/main/elixir/g0101_0200/s0160_intersection_of_two_linked_lists) [Rust](src/main/rust/g0101_0200/s0160_intersection_of_two_linked_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_II_Day_11_Linked_List, Udemy_Linked_List, Big_O_Time_O(M+N)_Space_O(1) | 67 | 93.58 +| 0155 |Min Stack| [Java](src/main/java/g0101_0200/s0155_min_stack) [Kotlin](src/main/kotlin/g0101_0200/s0155_min_stack) [TypeScript](src/main/ts/g0101_0200/s0155_min_stack) [Scala](src/main/scala/g0101_0200/s0155_min_stack) [Ruby](src/main/ruby/g0101_0200/s0155_min_stack) [PHP](src/main/php/g0101_0200/s0155_min_stack) [C#](src/main/csharp/g0101_0200/s0155_min_stack) [Go](src/main/go/g0101_0200/s0155_min_stack) [Cpp](src/main/cpp/g0101_0200/s0155_min_stack) [Python](src/main/python/g0101_0200/s0155_min_stack) [Swift](src/main/swift/g0101_0200/s0155_min_stack) [Elixir](src/main/elixir/g0101_0200/s0155_min_stack) [Rust](src/main/rust/g0101_0200/s0155_min_stack)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Stack, Design, Data_Structure_II_Day_14_Stack_Queue, Programming_Skills_II_Day_18, Level_2_Day_16_Design, Udemy_Design, Big_O_Time_O(1)_Space_O(N) | 84 | 92.72 +| 0153 |Find Minimum in Rotated Sorted Array| [Java](src/main/java/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [TypeScript](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Scala](src/main/scala/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Ruby](src/main/ruby/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [PHP](src/main/php/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [C#](src/main/csharp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Go](src/main/go/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Cpp](src/main/cpp/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Python](src/main/python/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Swift](src/main/swift/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Elixir](src/main/elixir/g0101_0200/s0153_find_minimum_in_rotated_sorted_array) [Rust](src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Algorithm_II_Day_2_Binary_Search, Binary_Search_I_Day_12, Udemy_Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 42 | 98.87 +| 0152 |Maximum Product Subarray| [Java](src/main/java/g0101_0200/s0152_maximum_product_subarray) [Kotlin](src/main/kotlin/g0101_0200/s0152_maximum_product_subarray) [TypeScript](src/main/ts/g0101_0200/s0152_maximum_product_subarray) [Scala](src/main/scala/g0101_0200/s0152_maximum_product_subarray) [Ruby](src/main/ruby/g0101_0200/s0152_maximum_product_subarray) [PHP](src/main/php/g0101_0200/s0152_maximum_product_subarray) [C#](src/main/csharp/g0101_0200/s0152_maximum_product_subarray) [Go](src/main/go/g0101_0200/s0152_maximum_product_subarray) [Cpp](src/main/cpp/g0101_0200/s0152_maximum_product_subarray) [Python](src/main/python/g0101_0200/s0152_maximum_product_subarray) [Swift](src/main/swift/g0101_0200/s0152_maximum_product_subarray) [Elixir](src/main/elixir/g0101_0200/s0152_maximum_product_subarray) [Rust](src/main/rust/g0101_0200/s0152_maximum_product_subarray)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Dynamic_Programming_I_Day_6, Level_2_Day_13_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(N)_Space_O(1) | 53 | 87.50 +| 0148 |Sort List| [Java](src/main/java/g0101_0200/s0148_sort_list) [Kotlin](src/main/kotlin/g0101_0200/s0148_sort_list) [TypeScript](src/main/ts/g0101_0200/s0148_sort_list) [Scala](src/main/scala/g0101_0200/s0148_sort_list) [Ruby](src/main/ruby/g0101_0200/s0148_sort_list) [PHP](src/main/php/g0101_0200/s0148_sort_list) [C#](src/main/csharp/g0101_0200/s0148_sort_list) [Go](src/main/go/g0101_0200/s0148_sort_list) [Cpp](src/main/cpp/g0101_0200/s0148_sort_list) [Python](src/main/python/g0101_0200/s0148_sort_list) [Swift](src/main/swift/g0101_0200/s0148_sort_list) [Elixir](src/main/elixir/g0101_0200/s0148_sort_list) [Rust](src/main/rust/g0101_0200/s0148_sort_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Sorting, Two_Pointers, Linked_List, Divide_and_Conquer, Merge_Sort, Level_2_Day_4_Linked_List, Big_O_Time_O(log(N))_Space_O(log(N)) | 141 | 97.14 +| 0146 |LRU Cache| [Java](src/main/java/g0101_0200/s0146_lru_cache) [Kotlin](src/main/kotlin/g0101_0200/s0146_lru_cache) [TypeScript](src/main/ts/g0101_0200/s0146_lru_cache) [Scala](src/main/scala/g0101_0200/s0146_lru_cache) [Ruby](src/main/ruby/g0101_0200/s0146_lru_cache) [PHP](src/main/php/g0101_0200/s0146_lru_cache) [C#](src/main/csharp/g0101_0200/s0146_lru_cache) [Go](src/main/go/g0101_0200/s0146_lru_cache) [Cpp](src/main/cpp/g0101_0200/s0146_lru_cache) [Python](src/main/python/g0101_0200/s0146_lru_cache) [Swift](src/main/swift/g0101_0200/s0146_lru_cache) [Elixir](src/main/elixir/g0101_0200/s0146_lru_cache) [Rust](src/main/rust/g0101_0200/s0146_lru_cache)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Design, Linked_List, Doubly_Linked_List, Udemy_Linked_List, Big_O_Time_O(1)_Space_O(capacity) | 473 | 94.72 +| 0142 |Linked List Cycle II| [Java](src/main/java/g0101_0200/s0142_linked_list_cycle_ii) [Kotlin](src/main/kotlin/g0101_0200/s0142_linked_list_cycle_ii) [TypeScript](src/main/ts/g0101_0200/s0142_linked_list_cycle_ii) [Scala](src/main/scala/g0101_0200/s0142_linked_list_cycle_ii) [Ruby](src/main/ruby/g0101_0200/s0142_linked_list_cycle_ii) [PHP](src/main/php/g0101_0200/s0142_linked_list_cycle_ii) [C#](src/main/csharp/g0101_0200/s0142_linked_list_cycle_ii) [Go](src/main/go/g0101_0200/s0142_linked_list_cycle_ii) [Cpp](src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii) [Python](src/main/python/g0101_0200/s0142_linked_list_cycle_ii) [Swift](src/main/swift/g0101_0200/s0142_linked_list_cycle_ii) [Elixir](src/main/elixir/g0101_0200/s0142_linked_list_cycle_ii) [Rust](src/main/rust/g0101_0200/s0142_linked_list_cycle_ii)| Medium | Top_100_Liked_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_II_Day_10_Linked_List, Level_1_Day_4_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 94.39 +| 0141 |Linked List Cycle| [Java](src/main/java/g0101_0200/s0141_linked_list_cycle) [Kotlin](src/main/kotlin/g0101_0200/s0141_linked_list_cycle) [TypeScript](src/main/ts/g0101_0200/s0141_linked_list_cycle) [Scala](src/main/scala/g0101_0200/s0141_linked_list_cycle) [Ruby](src/main/ruby/g0101_0200/s0141_linked_list_cycle) [PHP](src/main/php/g0101_0200/s0141_linked_list_cycle) [C#](src/main/csharp/g0101_0200/s0141_linked_list_cycle) [Go](src/main/go/g0101_0200/s0141_linked_list_cycle) [Cpp](src/main/cpp/g0101_0200/s0141_linked_list_cycle) [Python](src/main/python/g0101_0200/s0141_linked_list_cycle) [Swift](src/main/swift/g0101_0200/s0141_linked_list_cycle) [Elixir](src/main/elixir/g0101_0200/s0141_linked_list_cycle) [Rust](src/main/rust/g0101_0200/s0141_linked_list_cycle)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Two_Pointers, Linked_List, Data_Structure_I_Day_7_Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(1) | 59 | 93.37 +| 0139 |Word Break| [Java](src/main/java/g0101_0200/s0139_word_break) [Kotlin](src/main/kotlin/g0101_0200/s0139_word_break) [TypeScript](src/main/ts/g0101_0200/s0139_word_break) [Scala](src/main/scala/g0101_0200/s0139_word_break) [Ruby](src/main/ruby/g0101_0200/s0139_word_break) [PHP](src/main/php/g0101_0200/s0139_word_break) [C#](src/main/csharp/g0101_0200/s0139_word_break) [Go](src/main/go/g0101_0200/s0139_word_break) [Cpp](src/main/cpp/g0101_0200/s0139_word_break) [Python](src/main/python/g0101_0200/s0139_word_break) [Swift](src/main/swift/g0101_0200/s0139_word_break) [Elixir](src/main/elixir/g0101_0200/s0139_word_break) [Rust](src/main/rust/g0101_0200/s0139_word_break)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Dynamic_Programming, Trie, Memoization, Algorithm_II_Day_15_Dynamic_Programming, Dynamic_Programming_I_Day_9, Udemy_Dynamic_Programming, Big_O_Time_O(M+max\*N)_Space_O(M+N+max) | 56 | 88.44 +| 0138 |Copy List with Random Pointer| [Java](src/main/java/g0101_0200/s0138_copy_list_with_random_pointer) [Kotlin](src/main/kotlin/g0101_0200/s0138_copy_list_with_random_pointer) [TypeScript](src/main/ts/g0101_0200/s0138_copy_list_with_random_pointer) [Scala](src/main/scala/g0101_0200/s0138_copy_list_with_random_pointer) [Ruby](src/main/ruby/g0101_0200/s0138_copy_list_with_random_pointer) [PHP](src/main/php/g0101_0200/s0138_copy_list_with_random_pointer) [C#](src/main/csharp/g0101_0200/s0138_copy_list_with_random_pointer) [Go](src/main/go/g0101_0200/s0138_copy_list_with_random_pointer) [Cpp](src/main/cpp/g0101_0200/s0138_copy_list_with_random_pointer) [Python](src/main/python/g0101_0200/s0138_copy_list_with_random_pointer) [Swift](src/main/swift/g0101_0200/s0138_copy_list_with_random_pointer) [Elixir](src/main/elixir/g0101_0200/s0138_copy_list_with_random_pointer) [Rust](src/main/rust/g0101_0200/s0138_copy_list_with_random_pointer)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Hash_Table, Linked_List, Programming_Skills_II_Day_14, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(N) | 52 | 88.27 +| 0136 |Single Number| [Java](src/main/java/g0101_0200/s0136_single_number) [Kotlin](src/main/kotlin/g0101_0200/s0136_single_number) [TypeScript](src/main/ts/g0101_0200/s0136_single_number) [Scala](src/main/scala/g0101_0200/s0136_single_number) [Ruby](src/main/ruby/g0101_0200/s0136_single_number) [PHP](src/main/php/g0101_0200/s0136_single_number) [C#](src/main/csharp/g0101_0200/s0136_single_number) [Go](src/main/go/g0101_0200/s0136_single_number) [Cpp](src/main/cpp/g0101_0200/s0136_single_number) [Python](src/main/python/g0101_0200/s0136_single_number) [Swift](src/main/swift/g0101_0200/s0136_single_number) [Elixir](src/main/elixir/g0101_0200/s0136_single_number) [Rust](src/main/rust/g0101_0200/s0136_single_number)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Data_Structure_II_Day_1_Array, Algorithm_I_Day_14_Bit_Manipulation, Udemy_Integers, Big_O_Time_O(N)_Space_O(1) | 56 | 85.48 +| 0131 |Palindrome Partitioning| [Java](src/main/java/g0101_0200/s0131_palindrome_partitioning) [Kotlin](src/main/kotlin/g0101_0200/s0131_palindrome_partitioning) [TypeScript](src/main/ts/g0101_0200/s0131_palindrome_partitioning) [Scala](src/main/scala/g0101_0200/s0131_palindrome_partitioning) [Ruby](src/main/ruby/g0101_0200/s0131_palindrome_partitioning) [PHP](src/main/php/g0101_0200/s0131_palindrome_partitioning) [C#](src/main/csharp/g0101_0200/s0131_palindrome_partitioning) [Go](src/main/go/g0101_0200/s0131_palindrome_partitioning) [Cpp](src/main/cpp/g0101_0200/s0131_palindrome_partitioning) [Python](src/main/python/g0101_0200/s0131_palindrome_partitioning) [Swift](src/main/swift/g0101_0200/s0131_palindrome_partitioning) [Elixir](src/main/elixir/g0101_0200/s0131_palindrome_partitioning) [Rust](src/main/rust/g0101_0200/s0131_palindrome_partitioning)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Big_O_Time_O(N\*2^N)_Space_O(2^N\*N) | 203 | 99.22 +| 0128 |Longest Consecutive Sequence| [Java](src/main/java/g0101_0200/s0128_longest_consecutive_sequence) [Kotlin](src/main/kotlin/g0101_0200/s0128_longest_consecutive_sequence) [TypeScript](src/main/ts/g0101_0200/s0128_longest_consecutive_sequence) [Scala](src/main/scala/g0101_0200/s0128_longest_consecutive_sequence) [Ruby](src/main/ruby/g0101_0200/s0128_longest_consecutive_sequence) [PHP](src/main/php/g0101_0200/s0128_longest_consecutive_sequence) [C#](src/main/csharp/g0101_0200/s0128_longest_consecutive_sequence) [Go](src/main/go/g0101_0200/s0128_longest_consecutive_sequence) [Cpp](src/main/cpp/g0101_0200/s0128_longest_consecutive_sequence) [Python](src/main/python/g0101_0200/s0128_longest_consecutive_sequence) [Swift](src/main/swift/g0101_0200/s0128_longest_consecutive_sequence) [Elixir](src/main/elixir/g0101_0200/s0128_longest_consecutive_sequence) [Rust](src/main/rust/g0101_0200/s0128_longest_consecutive_sequence)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Union_Find, Big_O_Time_O(N_log_N)_Space_O(1) | 92 | 93.69 +| 0124 |Binary Tree Maximum Path Sum| [Java](src/main/java/g0101_0200/s0124_binary_tree_maximum_path_sum) [Kotlin](src/main/kotlin/g0101_0200/s0124_binary_tree_maximum_path_sum) [TypeScript](src/main/ts/g0101_0200/s0124_binary_tree_maximum_path_sum) [Scala](src/main/scala/g0101_0200/s0124_binary_tree_maximum_path_sum) [Ruby](src/main/ruby/g0101_0200/s0124_binary_tree_maximum_path_sum) [PHP](src/main/php/g0101_0200/s0124_binary_tree_maximum_path_sum) [C#](src/main/csharp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Go](src/main/go/g0101_0200/s0124_binary_tree_maximum_path_sum) [Cpp](src/main/cpp/g0101_0200/s0124_binary_tree_maximum_path_sum) [Python](src/main/python/g0101_0200/s0124_binary_tree_maximum_path_sum) [Swift](src/main/swift/g0101_0200/s0124_binary_tree_maximum_path_sum) [Elixir](src/main/elixir/g0101_0200/s0124_binary_tree_maximum_path_sum) [Rust](src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Depth_First_Search, Tree, Binary_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(N) | 61 | 96.73 +| 0121 |Best Time to Buy and Sell Stock| [Java](src/main/java/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Kotlin](src/main/kotlin/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [TypeScript](src/main/ts/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Scala](src/main/scala/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Ruby](src/main/ruby/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [PHP](src/main/php/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [C#](src/main/csharp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Go](src/main/go/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Cpp](src/main/cpp/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Python](src/main/python/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Swift](src/main/swift/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Elixir](src/main/elixir/g0101_0200/s0121_best_time_to_buy_and_sell_stock) [Rust](src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Data_Structure_I_Day_3_Array, Dynamic_Programming_I_Day_7, Level_1_Day_5_Greedy, Udemy_Arrays, Big_O_Time_O(N)_Space_O(1) | 56 | 99.56 +| 0114 |Flatten Binary Tree to Linked List| [Java](src/main/java/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Kotlin](src/main/kotlin/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [TypeScript](src/main/ts/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Scala](src/main/scala/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Ruby](src/main/ruby/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [PHP](src/main/php/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [C#](src/main/csharp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Go](src/main/go/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Cpp](src/main/cpp/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Python](src/main/python/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Swift](src/main/swift/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Elixir](src/main/elixir/g0101_0200/s0114_flatten_binary_tree_to_linked_list) [Rust](src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Linked_List, Udemy_Linked_List, Big_O_Time_O(N)_Space_O(N) | 55 | 90.66 +| 0105 |Construct Binary Tree from Preorder and Inorder Traversal| [Java](src/main/java/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [TypeScript](src/main/ts/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Scala](src/main/scala/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Ruby](src/main/ruby/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [PHP](src/main/php/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [C#](src/main/csharp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Go](src/main/go/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Cpp](src/main/cpp/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Python](src/main/python/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Swift](src/main/swift/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Elixir](src/main/elixir/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal) [Rust](src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Tree, Binary_Tree, Divide_and_Conquer, Data_Structure_II_Day_15_Tree, Big_O_Time_O(N)_Space_O(N) | 65 | 96.47 +| 0104 |Maximum Depth of Binary Tree| [Java](src/main/java/g0101_0200/s0104_maximum_depth_of_binary_tree) [Kotlin](src/main/kotlin/g0101_0200/s0104_maximum_depth_of_binary_tree) [TypeScript](src/main/ts/g0101_0200/s0104_maximum_depth_of_binary_tree) [Scala](src/main/scala/g0101_0200/s0104_maximum_depth_of_binary_tree) [Ruby](src/main/ruby/g0101_0200/s0104_maximum_depth_of_binary_tree) [PHP](src/main/php/g0101_0200/s0104_maximum_depth_of_binary_tree) [C#](src/main/csharp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Go](src/main/go/g0101_0200/s0104_maximum_depth_of_binary_tree) [Cpp](src/main/cpp/g0101_0200/s0104_maximum_depth_of_binary_tree) [Python](src/main/python/g0101_0200/s0104_maximum_depth_of_binary_tree) [Swift](src/main/swift/g0101_0200/s0104_maximum_depth_of_binary_tree) [Elixir](src/main/elixir/g0101_0200/s0104_maximum_depth_of_binary_tree) [Rust](src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Programming_Skills_I_Day_10_Linked_List_and_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(H) | 51 | 97.14 +| 0102 |Binary Tree Level Order Traversal| [Java](src/main/java/g0101_0200/s0102_binary_tree_level_order_traversal) [Kotlin](src/main/kotlin/g0101_0200/s0102_binary_tree_level_order_traversal) [TypeScript](src/main/ts/g0101_0200/s0102_binary_tree_level_order_traversal) [Scala](src/main/scala/g0101_0200/s0102_binary_tree_level_order_traversal) [Ruby](src/main/ruby/g0101_0200/s0102_binary_tree_level_order_traversal) [PHP](src/main/php/g0101_0200/s0102_binary_tree_level_order_traversal) [C#](src/main/csharp/g0101_0200/s0102_binary_tree_level_order_traversal) [Go](src/main/go/g0101_0200/s0102_binary_tree_level_order_traversal) [Cpp](src/main/cpp/g0101_0200/s0102_binary_tree_level_order_traversal) [Python](src/main/python/g0101_0200/s0102_binary_tree_level_order_traversal) [Swift](src/main/swift/g0101_0200/s0102_binary_tree_level_order_traversal) [Elixir](src/main/elixir/g0101_0200/s0102_binary_tree_level_order_traversal) [Rust](src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Level_1_Day_6_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(N) | 60 | 97.47 +| 0101 |Symmetric Tree| [Java](src/main/java/g0101_0200/s0101_symmetric_tree) [Kotlin](src/main/kotlin/g0101_0200/s0101_symmetric_tree) [TypeScript](src/main/ts/g0101_0200/s0101_symmetric_tree) [Scala](src/main/scala/g0101_0200/s0101_symmetric_tree) [Ruby](src/main/ruby/g0101_0200/s0101_symmetric_tree) [PHP](src/main/php/g0101_0200/s0101_symmetric_tree) [C#](src/main/csharp/g0101_0200/s0101_symmetric_tree) [Go](src/main/go/g0101_0200/s0101_symmetric_tree) [Cpp](src/main/cpp/g0101_0200/s0101_symmetric_tree) [Python](src/main/python/g0101_0200/s0101_symmetric_tree) [Swift](src/main/swift/g0101_0200/s0101_symmetric_tree) [Elixir](src/main/elixir/g0101_0200/s0101_symmetric_tree) [Rust](src/main/rust/g0101_0200/s0101_symmetric_tree)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Breadth_First_Search, Tree, Binary_Tree, Data_Structure_I_Day_11_Tree, Level_2_Day_15_Tree, Big_O_Time_O(N)_Space_O(log(N)) | 49 | 98.54 +| 0098 |Validate Binary Search Tree| [Java](src/main/java/g0001_0100/s0098_validate_binary_search_tree) [Kotlin](src/main/kotlin/g0001_0100/s0098_validate_binary_search_tree) [TypeScript](src/main/ts/g0001_0100/s0098_validate_binary_search_tree) [Scala](src/main/scala/g0001_0100/s0098_validate_binary_search_tree) [Ruby](src/main/ruby/g0001_0100/s0098_validate_binary_search_tree) [PHP](src/main/php/g0001_0100/s0098_validate_binary_search_tree) [C#](src/main/csharp/g0001_0100/s0098_validate_binary_search_tree) [Go](src/main/go/g0001_0100/s0098_validate_binary_search_tree) [Cpp](src/main/cpp/g0001_0100/s0098_validate_binary_search_tree) [Python](src/main/python/g0001_0100/s0098_validate_binary_search_tree) [Swift](src/main/swift/g0001_0100/s0098_validate_binary_search_tree) [Elixir](src/main/elixir/g0001_0100/s0098_validate_binary_search_tree) [Rust](src/main/rust/g0001_0100/s0098_validate_binary_search_tree)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Binary_Search_Tree, Data_Structure_I_Day_14_Tree, Level_1_Day_8_Binary_Search_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(N)_Space_O(log(N)) | 51 | 98.35 +| 0096 |Unique Binary Search Trees| [Java](src/main/java/g0001_0100/s0096_unique_binary_search_trees) [Kotlin](src/main/kotlin/g0001_0100/s0096_unique_binary_search_trees) [TypeScript](src/main/ts/g0001_0100/s0096_unique_binary_search_trees) [Scala](src/main/scala/g0001_0100/s0096_unique_binary_search_trees) [Ruby](src/main/ruby/g0001_0100/s0096_unique_binary_search_trees) [PHP](src/main/php/g0001_0100/s0096_unique_binary_search_trees) [C#](src/main/csharp/g0001_0100/s0096_unique_binary_search_trees) [Go](src/main/go/g0001_0100/s0096_unique_binary_search_trees) [Cpp](src/main/cpp/g0001_0100/s0096_unique_binary_search_trees) [Python](src/main/python/g0001_0100/s0096_unique_binary_search_trees) [Swift](src/main/swift/g0001_0100/s0096_unique_binary_search_trees) [Elixir](src/main/elixir/g0001_0100/s0096_unique_binary_search_trees) [Rust](src/main/rust/g0001_0100/s0096_unique_binary_search_trees)| Medium | Top_100_Liked_Questions, Dynamic_Programming, Math, Tree, Binary_Tree, Binary_Search_Tree, Dynamic_Programming_I_Day_11, Big_O_Time_O(n)_Space_O(1) | 45 | 96.00 +| 0094 |Binary Tree Inorder Traversal| [Java](src/main/java/g0001_0100/s0094_binary_tree_inorder_traversal) [Kotlin](src/main/kotlin/g0001_0100/s0094_binary_tree_inorder_traversal) [TypeScript](src/main/ts/g0001_0100/s0094_binary_tree_inorder_traversal) [Scala](src/main/scala/g0001_0100/s0094_binary_tree_inorder_traversal) [Ruby](src/main/ruby/g0001_0100/s0094_binary_tree_inorder_traversal) [PHP](src/main/php/g0001_0100/s0094_binary_tree_inorder_traversal) [C#](src/main/csharp/g0001_0100/s0094_binary_tree_inorder_traversal) [Go](src/main/go/g0001_0100/s0094_binary_tree_inorder_traversal) [Cpp](src/main/cpp/g0001_0100/s0094_binary_tree_inorder_traversal) [Python](src/main/python/g0001_0100/s0094_binary_tree_inorder_traversal) [Swift](src/main/swift/g0001_0100/s0094_binary_tree_inorder_traversal) [Elixir](src/main/elixir/g0001_0100/s0094_binary_tree_inorder_traversal) [Rust](src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Depth_First_Search, Tree, Binary_Tree, Stack, Data_Structure_I_Day_10_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 45 | 97.30 +| 0084 |Largest Rectangle in Histogram| [Java](src/main/java/g0001_0100/s0084_largest_rectangle_in_histogram) [Kotlin](src/main/kotlin/g0001_0100/s0084_largest_rectangle_in_histogram) [TypeScript](src/main/ts/g0001_0100/s0084_largest_rectangle_in_histogram) [Scala](src/main/scala/g0001_0100/s0084_largest_rectangle_in_histogram) [Ruby](src/main/ruby/g0001_0100/s0084_largest_rectangle_in_histogram) [PHP](src/main/php/g0001_0100/s0084_largest_rectangle_in_histogram) [C#](src/main/csharp/g0001_0100/s0084_largest_rectangle_in_histogram) [Go](src/main/go/g0001_0100/s0084_largest_rectangle_in_histogram) [Cpp](src/main/cpp/g0001_0100/s0084_largest_rectangle_in_histogram) [Python](src/main/python/g0001_0100/s0084_largest_rectangle_in_histogram) [Swift](src/main/swift/g0001_0100/s0084_largest_rectangle_in_histogram) [Elixir](src/main/elixir/g0001_0100/s0084_largest_rectangle_in_histogram) [Rust](src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Stack, Monotonic_Stack, Big_O_Time_O(n_log_n)_Space_O(log_n) | 78 | 92.44 +| 0079 |Word Search| [Java](src/main/java/g0001_0100/s0079_word_search) [Kotlin](src/main/kotlin/g0001_0100/s0079_word_search) [TypeScript](src/main/ts/g0001_0100/s0079_word_search) [Scala](src/main/scala/g0001_0100/s0079_word_search) [Ruby](src/main/ruby/g0001_0100/s0079_word_search) [PHP](src/main/php/g0001_0100/s0079_word_search) [C#](src/main/csharp/g0001_0100/s0079_word_search) [Go](src/main/go/g0001_0100/s0079_word_search) [Cpp](src/main/cpp/g0001_0100/s0079_word_search) [Python](src/main/python/g0001_0100/s0079_word_search) [Swift](src/main/swift/g0001_0100/s0079_word_search) [Elixir](src/main/elixir/g0001_0100/s0079_word_search) [Rust](src/main/rust/g0001_0100/s0079_word_search)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Matrix, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Big_O_Time_O(4^(m\*n))_Space_O(m\*n) | 327 | 95.78 +| 0078 |Subsets| [Java](src/main/java/g0001_0100/s0078_subsets) [Kotlin](src/main/kotlin/g0001_0100/s0078_subsets) [TypeScript](src/main/ts/g0001_0100/s0078_subsets) [Scala](src/main/scala/g0001_0100/s0078_subsets) [Ruby](src/main/ruby/g0001_0100/s0078_subsets) [PHP](src/main/php/g0001_0100/s0078_subsets) [C#](src/main/csharp/g0001_0100/s0078_subsets) [Go](src/main/go/g0001_0100/s0078_subsets) [Cpp](src/main/cpp/g0001_0100/s0078_subsets) [Python](src/main/python/g0001_0100/s0078_subsets) [Swift](src/main/swift/g0001_0100/s0078_subsets) [Elixir](src/main/elixir/g0001_0100/s0078_subsets) [Rust](src/main/rust/g0001_0100/s0078_subsets)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Bit_Manipulation, Backtracking, Algorithm_II_Day_9_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n\*2^n) | 50 | 94.61 +| 0076 |Minimum Window Substring| [Java](src/main/java/g0001_0100/s0076_minimum_window_substring) [Kotlin](src/main/kotlin/g0001_0100/s0076_minimum_window_substring) [TypeScript](src/main/ts/g0001_0100/s0076_minimum_window_substring) [Scala](src/main/scala/g0001_0100/s0076_minimum_window_substring) [Ruby](src/main/ruby/g0001_0100/s0076_minimum_window_substring) [PHP](src/main/php/g0001_0100/s0076_minimum_window_substring) [C#](src/main/csharp/g0001_0100/s0076_minimum_window_substring) [Go](src/main/go/g0001_0100/s0076_minimum_window_substring) [Cpp](src/main/cpp/g0001_0100/s0076_minimum_window_substring) [Python](src/main/python/g0001_0100/s0076_minimum_window_substring) [Swift](src/main/swift/g0001_0100/s0076_minimum_window_substring) [Elixir](src/main/elixir/g0001_0100/s0076_minimum_window_substring) [Rust](src/main/rust/g0001_0100/s0076_minimum_window_substring)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Level_2_Day_14_Sliding_Window/Two_Pointer, Big_O_Time_O(s.length())_Space_O(1) | 82 | 82.17 +| 0075 |Sort Colors| [Java](src/main/java/g0001_0100/s0075_sort_colors) [Kotlin](src/main/kotlin/g0001_0100/s0075_sort_colors) [TypeScript](src/main/ts/g0001_0100/s0075_sort_colors) [Scala](src/main/scala/g0001_0100/s0075_sort_colors) [Ruby](src/main/ruby/g0001_0100/s0075_sort_colors) [PHP](src/main/php/g0001_0100/s0075_sort_colors) [C#](src/main/csharp/g0001_0100/s0075_sort_colors) [Go](src/main/go/g0001_0100/s0075_sort_colors) [Cpp](src/main/cpp/g0001_0100/s0075_sort_colors) [Python](src/main/python/g0001_0100/s0075_sort_colors) [Swift](src/main/swift/g0001_0100/s0075_sort_colors) [Elixir](src/main/elixir/g0001_0100/s0075_sort_colors) [Rust](src/main/rust/g0001_0100/s0075_sort_colors)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Data_Structure_II_Day_2_Array, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 43 | 97.41 +| 0074 |Search a 2D Matrix| [Java](src/main/java/g0001_0100/s0074_search_a_2d_matrix) [Kotlin](src/main/kotlin/g0001_0100/s0074_search_a_2d_matrix) [TypeScript](src/main/ts/g0001_0100/s0074_search_a_2d_matrix) [Scala](src/main/scala/g0001_0100/s0074_search_a_2d_matrix) [Ruby](src/main/ruby/g0001_0100/s0074_search_a_2d_matrix) [PHP](src/main/php/g0001_0100/s0074_search_a_2d_matrix) [C#](src/main/csharp/g0001_0100/s0074_search_a_2d_matrix) [Go](src/main/go/g0001_0100/s0074_search_a_2d_matrix) [Cpp](src/main/cpp/g0001_0100/s0074_search_a_2d_matrix) [Python](src/main/python/g0001_0100/s0074_search_a_2d_matrix) [Swift](src/main/swift/g0001_0100/s0074_search_a_2d_matrix) [Elixir](src/main/elixir/g0001_0100/s0074_search_a_2d_matrix) [Rust](src/main/rust/g0001_0100/s0074_search_a_2d_matrix)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Data_Structure_I_Day_5_Array, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_8, Level_2_Day_8_Binary_Search, Udemy_2D_Arrays/Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 45 | 96.82 +| 0073 |Set Matrix Zeroes| [Java](src/main/java/g0001_0100/s0073_set_matrix_zeroes) [Kotlin](src/main/kotlin/g0001_0100/s0073_set_matrix_zeroes) [TypeScript](src/main/ts/g0001_0100/s0073_set_matrix_zeroes) [Scala](src/main/scala/g0001_0100/s0073_set_matrix_zeroes) [Ruby](src/main/ruby/g0001_0100/s0073_set_matrix_zeroes) [PHP](src/main/php/g0001_0100/s0073_set_matrix_zeroes) [C#](src/main/csharp/g0001_0100/s0073_set_matrix_zeroes) [Go](src/main/go/g0001_0100/s0073_set_matrix_zeroes) [Cpp](src/main/cpp/g0001_0100/s0073_set_matrix_zeroes) [Python](src/main/python/g0001_0100/s0073_set_matrix_zeroes) [Swift](src/main/swift/g0001_0100/s0073_set_matrix_zeroes) [Elixir](src/main/elixir/g0001_0100/s0073_set_matrix_zeroes) [Rust](src/main/rust/g0001_0100/s0073_set_matrix_zeroes)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Matrix, Udemy_2D_Arrays/Matrix, Big_O_Time_O(m\*n)_Space_O(1) | 61 | 97.66 +| 0072 |Edit Distance| [Java](src/main/java/g0001_0100/s0072_edit_distance) [Kotlin](src/main/kotlin/g0001_0100/s0072_edit_distance) [TypeScript](src/main/ts/g0001_0100/s0072_edit_distance) [Scala](src/main/scala/g0001_0100/s0072_edit_distance) [Ruby](src/main/ruby/g0001_0100/s0072_edit_distance) [PHP](src/main/php/g0001_0100/s0072_edit_distance) [C#](src/main/csharp/g0001_0100/s0072_edit_distance) [Go](src/main/go/g0001_0100/s0072_edit_distance) [Cpp](src/main/cpp/g0001_0100/s0072_edit_distance) [Python](src/main/python/g0001_0100/s0072_edit_distance) [Swift](src/main/swift/g0001_0100/s0072_edit_distance) [Elixir](src/main/elixir/g0001_0100/s0072_edit_distance) [Rust](src/main/rust/g0001_0100/s0072_edit_distance)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Algorithm_II_Day_18_Dynamic_Programming, Dynamic_Programming_I_Day_19, Udemy_Dynamic_Programming, Big_O_Time_O(n^2)_Space_O(n2) | 68 | 95.20 +| 0070 |Climbing Stairs| [Java](src/main/java/g0001_0100/s0070_climbing_stairs) [Kotlin](src/main/kotlin/g0001_0100/s0070_climbing_stairs) [TypeScript](src/main/ts/g0001_0100/s0070_climbing_stairs) [Scala](src/main/scala/g0001_0100/s0070_climbing_stairs) [Ruby](src/main/ruby/g0001_0100/s0070_climbing_stairs) [PHP](src/main/php/g0001_0100/s0070_climbing_stairs) [C#](src/main/csharp/g0001_0100/s0070_climbing_stairs) [Go](src/main/go/g0001_0100/s0070_climbing_stairs) [Cpp](src/main/cpp/g0001_0100/s0070_climbing_stairs) [Python](src/main/python/g0001_0100/s0070_climbing_stairs) [Swift](src/main/swift/g0001_0100/s0070_climbing_stairs) [Elixir](src/main/elixir/g0001_0100/s0070_climbing_stairs) [Rust](src/main/rust/g0001_0100/s0070_climbing_stairs)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Memoization, Algorithm_I_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_2, Level_1_Day_10_Dynamic_Programming, Udemy_Dynamic_Programming, Big_O_Time_O(n)_Space_O(n) | 44 | 94.58 +| 0064 |Minimum Path Sum| [Java](src/main/java/g0001_0100/s0064_minimum_path_sum) [Kotlin](src/main/kotlin/g0001_0100/s0064_minimum_path_sum) [TypeScript](src/main/ts/g0001_0100/s0064_minimum_path_sum) [Scala](src/main/scala/g0001_0100/s0064_minimum_path_sum) [Ruby](src/main/ruby/g0001_0100/s0064_minimum_path_sum) [PHP](src/main/php/g0001_0100/s0064_minimum_path_sum) [C#](src/main/csharp/g0001_0100/s0064_minimum_path_sum) [Go](src/main/go/g0001_0100/s0064_minimum_path_sum) [Cpp](src/main/cpp/g0001_0100/s0064_minimum_path_sum) [Python](src/main/python/g0001_0100/s0064_minimum_path_sum) [Swift](src/main/swift/g0001_0100/s0064_minimum_path_sum) [Elixir](src/main/elixir/g0001_0100/s0064_minimum_path_sum) [Rust](src/main/rust/g0001_0100/s0064_minimum_path_sum)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Matrix, Dynamic_Programming_I_Day_16, Udemy_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 48 | 99.67 +| 0062 |Unique Paths| [Java](src/main/java/g0001_0100/s0062_unique_paths) [Kotlin](src/main/kotlin/g0001_0100/s0062_unique_paths) [TypeScript](src/main/ts/g0001_0100/s0062_unique_paths) [Scala](src/main/scala/g0001_0100/s0062_unique_paths) [Ruby](src/main/ruby/g0001_0100/s0062_unique_paths) [PHP](src/main/php/g0001_0100/s0062_unique_paths) [C#](src/main/csharp/g0001_0100/s0062_unique_paths) [Go](src/main/go/g0001_0100/s0062_unique_paths) [Cpp](src/main/cpp/g0001_0100/s0062_unique_paths) [Python](src/main/python/g0001_0100/s0062_unique_paths) [Swift](src/main/swift/g0001_0100/s0062_unique_paths) [Elixir](src/main/elixir/g0001_0100/s0062_unique_paths) [Rust](src/main/rust/g0001_0100/s0062_unique_paths)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Dynamic_Programming, Math, Combinatorics, Algorithm_II_Day_13_Dynamic_Programming, Dynamic_Programming_I_Day_15, Level_1_Day_11_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 40 | 98.97 +| 0056 |Merge Intervals| [Java](src/main/java/g0001_0100/s0056_merge_intervals) [Kotlin](src/main/kotlin/g0001_0100/s0056_merge_intervals) [TypeScript](src/main/ts/g0001_0100/s0056_merge_intervals) [Scala](src/main/scala/g0001_0100/s0056_merge_intervals) [Ruby](src/main/ruby/g0001_0100/s0056_merge_intervals) [PHP](src/main/php/g0001_0100/s0056_merge_intervals) [C#](src/main/csharp/g0001_0100/s0056_merge_intervals) [Go](src/main/go/g0001_0100/s0056_merge_intervals) [Cpp](src/main/cpp/g0001_0100/s0056_merge_intervals) [Python](src/main/python/g0001_0100/s0056_merge_intervals) [Swift](src/main/swift/g0001_0100/s0056_merge_intervals) [Elixir](src/main/elixir/g0001_0100/s0056_merge_intervals) [Rust](src/main/rust/g0001_0100/s0056_merge_intervals)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Data_Structure_II_Day_2_Array, Level_2_Day_17_Interval, Udemy_2D_Arrays/Matrix, Big_O_Time_O(n_log_n)_Space_O(n) | 84 | 92.06 +| 0055 |Jump Game| [Java](src/main/java/g0001_0100/s0055_jump_game) [Kotlin](src/main/kotlin/g0001_0100/s0055_jump_game) [TypeScript](src/main/ts/g0001_0100/s0055_jump_game) [Scala](src/main/scala/g0001_0100/s0055_jump_game) [Ruby](src/main/ruby/g0001_0100/s0055_jump_game) [PHP](src/main/php/g0001_0100/s0055_jump_game) [C#](src/main/csharp/g0001_0100/s0055_jump_game) [Go](src/main/go/g0001_0100/s0055_jump_game) [Cpp](src/main/cpp/g0001_0100/s0055_jump_game) [Python](src/main/python/g0001_0100/s0055_jump_game) [Swift](src/main/swift/g0001_0100/s0055_jump_game) [Elixir](src/main/elixir/g0001_0100/s0055_jump_game) [Rust](src/main/rust/g0001_0100/s0055_jump_game)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_12_Dynamic_Programming, Dynamic_Programming_I_Day_4, Udemy_Arrays, Big_O_Time_O(n)_Space_O(1) | 58 | 91.95 +| 0053 |Maximum Subarray| [Java](src/main/java/g0001_0100/s0053_maximum_subarray) [Kotlin](src/main/kotlin/g0001_0100/s0053_maximum_subarray) [TypeScript](src/main/ts/g0001_0100/s0053_maximum_subarray) [Scala](src/main/scala/g0001_0100/s0053_maximum_subarray) [Ruby](src/main/ruby/g0001_0100/s0053_maximum_subarray) [PHP](src/main/php/g0001_0100/s0053_maximum_subarray) [C#](src/main/csharp/g0001_0100/s0053_maximum_subarray) [Go](src/main/go/g0001_0100/s0053_maximum_subarray) [Cpp](src/main/cpp/g0001_0100/s0053_maximum_subarray) [Python](src/main/python/g0001_0100/s0053_maximum_subarray) [Swift](src/main/swift/g0001_0100/s0053_maximum_subarray) [Elixir](src/main/elixir/g0001_0100/s0053_maximum_subarray) [Rust](src/main/rust/g0001_0100/s0053_maximum_subarray)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Divide_and_Conquer, Data_Structure_I_Day_1_Array, Dynamic_Programming_I_Day_5, Udemy_Famous_Algorithm, Big_O_Time_O(n)_Space_O(1) | 66 | 90.36 +| 0051 |N-Queens| [Java](src/main/java/g0001_0100/s0051_n_queens) [Kotlin](src/main/kotlin/g0001_0100/s0051_n_queens) [TypeScript](src/main/ts/g0001_0100/s0051_n_queens) [Scala](src/main/scala/g0001_0100/s0051_n_queens) [Ruby](src/main/ruby/g0001_0100/s0051_n_queens) [PHP](src/main/php/g0001_0100/s0051_n_queens) [C#](src/main/csharp/g0001_0100/s0051_n_queens) [Go](src/main/go/g0001_0100/s0051_n_queens) [Cpp](src/main/cpp/g0001_0100/s0051_n_queens) [Python](src/main/python/g0001_0100/s0051_n_queens) [Swift](src/main/swift/g0001_0100/s0051_n_queens) [Elixir](src/main/elixir/g0001_0100/s0051_n_queens) [Rust](src/main/rust/g0001_0100/s0051_n_queens)| Hard | Top_100_Liked_Questions, Array, Backtracking, Big_O_Time_O(N!)_Space_O(N) | 57 | 93.84 +| 0049 |Group Anagrams| [Java](src/main/java/g0001_0100/s0049_group_anagrams) [Kotlin](src/main/kotlin/g0001_0100/s0049_group_anagrams) [TypeScript](src/main/ts/g0001_0100/s0049_group_anagrams) [Scala](src/main/scala/g0001_0100/s0049_group_anagrams) [Ruby](src/main/ruby/g0001_0100/s0049_group_anagrams) [PHP](src/main/php/g0001_0100/s0049_group_anagrams) [C#](src/main/csharp/g0001_0100/s0049_group_anagrams) [Go](src/main/go/g0001_0100/s0049_group_anagrams) [Cpp](src/main/cpp/g0001_0100/s0049_group_anagrams) [Python](src/main/python/g0001_0100/s0049_group_anagrams) [Swift](src/main/swift/g0001_0100/s0049_group_anagrams) [Elixir](src/main/elixir/g0001_0100/s0049_group_anagrams) [Rust](src/main/rust/g0001_0100/s0049_group_anagrams)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, String, Hash_Table, Sorting, Data_Structure_II_Day_8_String, Programming_Skills_II_Day_11, Udemy_Strings, Big_O_Time_O(n\*k_log_k)_Space_O(n) | 93 | 97.29 +| 0048 |Rotate Image| [Java](src/main/java/g0001_0100/s0048_rotate_image) [Kotlin](src/main/kotlin/g0001_0100/s0048_rotate_image) [TypeScript](src/main/ts/g0001_0100/s0048_rotate_image) [Scala](src/main/scala/g0001_0100/s0048_rotate_image) [Ruby](src/main/ruby/g0001_0100/s0048_rotate_image) [PHP](src/main/php/g0001_0100/s0048_rotate_image) [C#](src/main/csharp/g0001_0100/s0048_rotate_image) [Go](src/main/go/g0001_0100/s0048_rotate_image) [Cpp](src/main/cpp/g0001_0100/s0048_rotate_image) [Python](src/main/python/g0001_0100/s0048_rotate_image) [Swift](src/main/swift/g0001_0100/s0048_rotate_image) [Elixir](src/main/elixir/g0001_0100/s0048_rotate_image) [Rust](src/main/rust/g0001_0100/s0048_rotate_image)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Math, Matrix, Data_Structure_II_Day_3_Array, Programming_Skills_II_Day_7, Udemy_2D_Arrays/Matrix, Big_O_Time_O(n^2)_Space_O(1) | 45 | 95.31 +| 0046 |Permutations| [Java](src/main/java/g0001_0100/s0046_permutations) [Kotlin](src/main/kotlin/g0001_0100/s0046_permutations) [TypeScript](src/main/ts/g0001_0100/s0046_permutations) [Scala](src/main/scala/g0001_0100/s0046_permutations) [Ruby](src/main/ruby/g0001_0100/s0046_permutations) [PHP](src/main/php/g0001_0100/s0046_permutations) [C#](src/main/csharp/g0001_0100/s0046_permutations) [Go](src/main/go/g0001_0100/s0046_permutations) [Cpp](src/main/cpp/g0001_0100/s0046_permutations) [Python](src/main/python/g0001_0100/s0046_permutations) [Swift](src/main/swift/g0001_0100/s0046_permutations) [Elixir](src/main/elixir/g0001_0100/s0046_permutations) [Rust](src/main/rust/g0001_0100/s0046_permutations)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Backtracking, Algorithm_I_Day_11_Recursion_Backtracking, Level_2_Day_20_Brute_Force/Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(n\*n!)_Space_O(n+n!) | 56 | 96.26 +| 0045 |Jump Game II| [Java](src/main/java/g0001_0100/s0045_jump_game_ii) [Kotlin](src/main/kotlin/g0001_0100/s0045_jump_game_ii) [TypeScript](src/main/ts/g0001_0100/s0045_jump_game_ii) [Scala](src/main/scala/g0001_0100/s0045_jump_game_ii) [Ruby](src/main/ruby/g0001_0100/s0045_jump_game_ii) [PHP](src/main/php/g0001_0100/s0045_jump_game_ii) [C#](src/main/csharp/g0001_0100/s0045_jump_game_ii) [Go](src/main/go/g0001_0100/s0045_jump_game_ii) [Cpp](src/main/cpp/g0001_0100/s0045_jump_game_ii) [Python](src/main/python/g0001_0100/s0045_jump_game_ii) [Swift](src/main/swift/g0001_0100/s0045_jump_game_ii) [Elixir](src/main/elixir/g0001_0100/s0045_jump_game_ii) [Rust](src/main/rust/g0001_0100/s0045_jump_game_ii)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Greedy, Algorithm_II_Day_13_Dynamic_Programming, Dynamic_Programming_I_Day_4, Big_O_Time_O(n)_Space_O(1) | 50 | 95.93 +| 0042 |Trapping Rain Water| [Java](src/main/java/g0001_0100/s0042_trapping_rain_water) [Kotlin](src/main/kotlin/g0001_0100/s0042_trapping_rain_water) [TypeScript](src/main/ts/g0001_0100/s0042_trapping_rain_water) [Scala](src/main/scala/g0001_0100/s0042_trapping_rain_water) [Ruby](src/main/ruby/g0001_0100/s0042_trapping_rain_water) [PHP](src/main/php/g0001_0100/s0042_trapping_rain_water) [C#](src/main/csharp/g0001_0100/s0042_trapping_rain_water) [Go](src/main/go/g0001_0100/s0042_trapping_rain_water) [Cpp](src/main/cpp/g0001_0100/s0042_trapping_rain_water) [Python](src/main/python/g0001_0100/s0042_trapping_rain_water) [Swift](src/main/swift/g0001_0100/s0042_trapping_rain_water) [Elixir](src/main/elixir/g0001_0100/s0042_trapping_rain_water) [Rust](src/main/rust/g0001_0100/s0042_trapping_rain_water)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Dynamic_Programming, Two_Pointers, Stack, Monotonic_Stack, Dynamic_Programming_I_Day_9, Udemy_Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 46 | 99.52 +| 0041 |First Missing Positive| [Java](src/main/java/g0001_0100/s0041_first_missing_positive) [Kotlin](src/main/kotlin/g0001_0100/s0041_first_missing_positive) [TypeScript](src/main/ts/g0001_0100/s0041_first_missing_positive) [Scala](src/main/scala/g0001_0100/s0041_first_missing_positive) [Ruby](src/main/ruby/g0001_0100/s0041_first_missing_positive) [PHP](src/main/php/g0001_0100/s0041_first_missing_positive) [C#](src/main/csharp/g0001_0100/s0041_first_missing_positive) [Go](src/main/go/g0001_0100/s0041_first_missing_positive) [Cpp](src/main/cpp/g0001_0100/s0041_first_missing_positive) [Python](src/main/python/g0001_0100/s0041_first_missing_positive) [Swift](src/main/swift/g0001_0100/s0041_first_missing_positive) [Elixir](src/main/elixir/g0001_0100/s0041_first_missing_positive) [Rust](src/main/rust/g0001_0100/s0041_first_missing_positive)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Udemy_Arrays, Big_O_Time_O(n)_Space_O(n) | 55 | 98.51 +| 0039 |Combination Sum| [Java](src/main/java/g0001_0100/s0039_combination_sum) [Kotlin](src/main/kotlin/g0001_0100/s0039_combination_sum) [TypeScript](src/main/ts/g0001_0100/s0039_combination_sum) [Scala](src/main/scala/g0001_0100/s0039_combination_sum) [Ruby](src/main/ruby/g0001_0100/s0039_combination_sum) [PHP](src/main/php/g0001_0100/s0039_combination_sum) [C#](src/main/csharp/g0001_0100/s0039_combination_sum) [Go](src/main/go/g0001_0100/s0039_combination_sum) [Cpp](src/main/cpp/g0001_0100/s0039_combination_sum) [Python](src/main/python/g0001_0100/s0039_combination_sum) [Swift](src/main/swift/g0001_0100/s0039_combination_sum) [Elixir](src/main/elixir/g0001_0100/s0039_combination_sum) [Rust](src/main/rust/g0001_0100/s0039_combination_sum)| Medium | Top_100_Liked_Questions, Array, Backtracking, Algorithm_II_Day_10_Recursion_Backtracking, Level_2_Day_20_Brute_Force/Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n+2^n) | 65 | 86.86 +| 0035 |Search Insert Position| [Java](src/main/java/g0001_0100/s0035_search_insert_position) [Kotlin](src/main/kotlin/g0001_0100/s0035_search_insert_position) [TypeScript](src/main/ts/g0001_0100/s0035_search_insert_position) [Scala](src/main/scala/g0001_0100/s0035_search_insert_position) [Ruby](src/main/ruby/g0001_0100/s0035_search_insert_position) [PHP](src/main/php/g0001_0100/s0035_search_insert_position) [C#](src/main/csharp/g0001_0100/s0035_search_insert_position) [Go](src/main/go/g0001_0100/s0035_search_insert_position) [Cpp](src/main/cpp/g0001_0100/s0035_search_insert_position) [Python](src/main/python/g0001_0100/s0035_search_insert_position) [Swift](src/main/swift/g0001_0100/s0035_search_insert_position) [Elixir](src/main/elixir/g0001_0100/s0035_search_insert_position) [Rust](src/main/rust/g0001_0100/s0035_search_insert_position)| Easy | Top_100_Liked_Questions, Array, Binary_Search, Algorithm_I_Day_1_Binary_Search, Binary_Search_I_Day_2, Big_O_Time_O(log_n)_Space_O(1) | 51 | 80.95 +| 0034 |Find First and Last Position of Element in Sorted Array| [Java](src/main/java/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Scala](src/main/scala/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [PHP](src/main/php/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [C#](src/main/csharp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Go](src/main/go/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Python](src/main/python/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Swift](src/main/swift/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array) [Rust](src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_5, Big_O_Time_O(log_n)_Space_O(1) | 45 | 98.05 +| 0033 |Search in Rotated Sorted Array| [Java](src/main/java/g0001_0100/s0033_search_in_rotated_sorted_array) [Kotlin](src/main/kotlin/g0001_0100/s0033_search_in_rotated_sorted_array) [TypeScript](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array) [Scala](src/main/scala/g0001_0100/s0033_search_in_rotated_sorted_array) [Ruby](src/main/ruby/g0001_0100/s0033_search_in_rotated_sorted_array) [PHP](src/main/php/g0001_0100/s0033_search_in_rotated_sorted_array) [C#](src/main/csharp/g0001_0100/s0033_search_in_rotated_sorted_array) [Go](src/main/go/g0001_0100/s0033_search_in_rotated_sorted_array) [Cpp](src/main/cpp/g0001_0100/s0033_search_in_rotated_sorted_array) [Python](src/main/python/g0001_0100/s0033_search_in_rotated_sorted_array) [Swift](src/main/swift/g0001_0100/s0033_search_in_rotated_sorted_array) [Elixir](src/main/elixir/g0001_0100/s0033_search_in_rotated_sorted_array) [Rust](src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Algorithm_II_Day_1_Binary_Search, Binary_Search_I_Day_11, Level_2_Day_8_Binary_Search, Udemy_Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 43 | 98.54 +| 0032 |Longest Valid Parentheses| [Java](src/main/java/g0001_0100/s0032_longest_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0032_longest_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0032_longest_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0032_longest_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0032_longest_valid_parentheses) [PHP](src/main/php/g0001_0100/s0032_longest_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0032_longest_valid_parentheses) [Go](src/main/go/g0001_0100/s0032_longest_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0032_longest_valid_parentheses) [Python](src/main/python/g0001_0100/s0032_longest_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0032_longest_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0032_longest_valid_parentheses) [Rust](src/main/rust/g0001_0100/s0032_longest_valid_parentheses)| Hard | Top_100_Liked_Questions, String, Dynamic_Programming, Stack, Big_O_Time_O(n)_Space_O(1) | 56 | 89.31 +| 0031 |Next Permutation| [Java](src/main/java/g0001_0100/s0031_next_permutation) [Kotlin](src/main/kotlin/g0001_0100/s0031_next_permutation) [TypeScript](src/main/ts/g0001_0100/s0031_next_permutation) [Scala](src/main/scala/g0001_0100/s0031_next_permutation) [Ruby](src/main/ruby/g0001_0100/s0031_next_permutation) [PHP](src/main/php/g0001_0100/s0031_next_permutation) [C#](src/main/csharp/g0001_0100/s0031_next_permutation) [Go](src/main/go/g0001_0100/s0031_next_permutation) [Cpp](src/main/cpp/g0001_0100/s0031_next_permutation) [Python](src/main/python/g0001_0100/s0031_next_permutation) [Swift](src/main/swift/g0001_0100/s0031_next_permutation) [Elixir](src/main/elixir/g0001_0100/s0031_next_permutation) [Rust](src/main/rust/g0001_0100/s0031_next_permutation)| Medium | Top_100_Liked_Questions, Array, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 47 | 99.30 +| 0025 |Reverse Nodes in k-Group| [Java](src/main/java/g0001_0100/s0025_reverse_nodes_in_k_group) [Kotlin](src/main/kotlin/g0001_0100/s0025_reverse_nodes_in_k_group) [TypeScript](src/main/ts/g0001_0100/s0025_reverse_nodes_in_k_group) [Scala](src/main/scala/g0001_0100/s0025_reverse_nodes_in_k_group) [Ruby](src/main/ruby/g0001_0100/s0025_reverse_nodes_in_k_group) [PHP](src/main/php/g0001_0100/s0025_reverse_nodes_in_k_group) [C#](src/main/csharp/g0001_0100/s0025_reverse_nodes_in_k_group) [Go](src/main/go/g0001_0100/s0025_reverse_nodes_in_k_group) [Cpp](src/main/cpp/g0001_0100/s0025_reverse_nodes_in_k_group) [Python](src/main/python/g0001_0100/s0025_reverse_nodes_in_k_group) [Swift](src/main/swift/g0001_0100/s0025_reverse_nodes_in_k_group) [Elixir](src/main/elixir/g0001_0100/s0025_reverse_nodes_in_k_group) [Rust](src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group)| Hard | Top_100_Liked_Questions, Linked_List, Recursion, Data_Structure_II_Day_13_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(k) | 74 | 66.83 +| 0024 |Swap Nodes in Pairs| [Java](src/main/java/g0001_0100/s0024_swap_nodes_in_pairs) [Kotlin](src/main/kotlin/g0001_0100/s0024_swap_nodes_in_pairs) [TypeScript](src/main/ts/g0001_0100/s0024_swap_nodes_in_pairs) [Scala](src/main/scala/g0001_0100/s0024_swap_nodes_in_pairs) [Ruby](src/main/ruby/g0001_0100/s0024_swap_nodes_in_pairs) [PHP](src/main/php/g0001_0100/s0024_swap_nodes_in_pairs) [C#](src/main/csharp/g0001_0100/s0024_swap_nodes_in_pairs) [Go](src/main/go/g0001_0100/s0024_swap_nodes_in_pairs) [Cpp](src/main/cpp/g0001_0100/s0024_swap_nodes_in_pairs) [Python](src/main/python/g0001_0100/s0024_swap_nodes_in_pairs) [Swift](src/main/swift/g0001_0100/s0024_swap_nodes_in_pairs) [Elixir](src/main/elixir/g0001_0100/s0024_swap_nodes_in_pairs) [Rust](src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs)| Medium | Top_100_Liked_Questions, Linked_List, Recursion, Data_Structure_II_Day_12_Linked_List, Udemy_Linked_List, Big_O_Time_O(n)_Space_O(1) | 59 | 62.67 +| 0023 |Merge k Sorted Lists| [Java](src/main/java/g0001_0100/s0023_merge_k_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0023_merge_k_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0023_merge_k_sorted_lists) [Scala](src/main/scala/g0001_0100/s0023_merge_k_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0023_merge_k_sorted_lists) [PHP](src/main/php/g0001_0100/s0023_merge_k_sorted_lists) [C#](src/main/csharp/g0001_0100/s0023_merge_k_sorted_lists) [Go](src/main/go/g0001_0100/s0023_merge_k_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0023_merge_k_sorted_lists) [Python](src/main/python/g0001_0100/s0023_merge_k_sorted_lists) [Swift](src/main/swift/g0001_0100/s0023_merge_k_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0023_merge_k_sorted_lists) [Rust](src/main/rust/g0001_0100/s0023_merge_k_sorted_lists)| 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)) | 76 | 94.52 +| 0022 |Generate Parentheses| [Java](src/main/java/g0001_0100/s0022_generate_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0022_generate_parentheses) [TypeScript](src/main/ts/g0001_0100/s0022_generate_parentheses) [Scala](src/main/scala/g0001_0100/s0022_generate_parentheses) [Ruby](src/main/ruby/g0001_0100/s0022_generate_parentheses) [PHP](src/main/php/g0001_0100/s0022_generate_parentheses) [C#](src/main/csharp/g0001_0100/s0022_generate_parentheses) [Go](src/main/go/g0001_0100/s0022_generate_parentheses) [Cpp](src/main/cpp/g0001_0100/s0022_generate_parentheses) [Python](src/main/python/g0001_0100/s0022_generate_parentheses) [Swift](src/main/swift/g0001_0100/s0022_generate_parentheses) [Elixir](src/main/elixir/g0001_0100/s0022_generate_parentheses) [Rust](src/main/rust/g0001_0100/s0022_generate_parentheses)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(2^n)_Space_O(n) | 60 | 62.03 +| 0021 |Merge Two Sorted Lists| [Java](src/main/java/g0001_0100/s0021_merge_two_sorted_lists) [Kotlin](src/main/kotlin/g0001_0100/s0021_merge_two_sorted_lists) [TypeScript](src/main/ts/g0001_0100/s0021_merge_two_sorted_lists) [Scala](src/main/scala/g0001_0100/s0021_merge_two_sorted_lists) [Ruby](src/main/ruby/g0001_0100/s0021_merge_two_sorted_lists) [PHP](src/main/php/g0001_0100/s0021_merge_two_sorted_lists) [C#](src/main/csharp/g0001_0100/s0021_merge_two_sorted_lists) [Go](src/main/go/g0001_0100/s0021_merge_two_sorted_lists) [Cpp](src/main/cpp/g0001_0100/s0021_merge_two_sorted_lists) [Python](src/main/python/g0001_0100/s0021_merge_two_sorted_lists) [Swift](src/main/swift/g0001_0100/s0021_merge_two_sorted_lists) [Elixir](src/main/elixir/g0001_0100/s0021_merge_two_sorted_lists) [Rust](src/main/rust/g0001_0100/s0021_merge_two_sorted_lists)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Linked_List, Recursion, Data_Structure_I_Day_7_Linked_List, Algorithm_I_Day_10_Recursion_Backtracking, Level_1_Day_3_Linked_List, Udemy_Linked_List, Big_O_Time_O(m+n)_Space_O(m+n) | 59 | 86.77 +| 0020 |Valid Parentheses| [Java](src/main/java/g0001_0100/s0020_valid_parentheses) [Kotlin](src/main/kotlin/g0001_0100/s0020_valid_parentheses) [TypeScript](src/main/ts/g0001_0100/s0020_valid_parentheses) [Scala](src/main/scala/g0001_0100/s0020_valid_parentheses) [Ruby](src/main/ruby/g0001_0100/s0020_valid_parentheses) [PHP](src/main/php/g0001_0100/s0020_valid_parentheses) [C#](src/main/csharp/g0001_0100/s0020_valid_parentheses) [Go](src/main/go/g0001_0100/s0020_valid_parentheses) [Cpp](src/main/cpp/g0001_0100/s0020_valid_parentheses) [Python](src/main/python/g0001_0100/s0020_valid_parentheses) [Swift](src/main/swift/g0001_0100/s0020_valid_parentheses) [Elixir](src/main/elixir/g0001_0100/s0020_valid_parentheses) [Rust](src/main/rust/g0001_0100/s0020_valid_parentheses)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, String, Stack, Data_Structure_I_Day_9_Stack_Queue, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 50 | 95.90 +| 0019 |Remove Nth Node From End of List| [Java](src/main/java/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Kotlin](src/main/kotlin/g0001_0100/s0019_remove_nth_node_from_end_of_list) [TypeScript](src/main/ts/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Scala](src/main/scala/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Ruby](src/main/ruby/g0001_0100/s0019_remove_nth_node_from_end_of_list) [PHP](src/main/php/g0001_0100/s0019_remove_nth_node_from_end_of_list) [C#](src/main/csharp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Go](src/main/go/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Cpp](src/main/cpp/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Python](src/main/python/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Swift](src/main/swift/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Elixir](src/main/elixir/g0001_0100/s0019_remove_nth_node_from_end_of_list) [Rust](src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Two_Pointers, Linked_List, Algorithm_I_Day_5_Two_Pointers, Level_2_Day_3_Linked_List, Big_O_Time_O(L)_Space_O(L) | 54 | 87.87 +| 0017 |Letter Combinations of a Phone Number| [Java](src/main/java/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Kotlin](src/main/kotlin/g0001_0100/s0017_letter_combinations_of_a_phone_number) [TypeScript](src/main/ts/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Scala](src/main/scala/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Ruby](src/main/ruby/g0001_0100/s0017_letter_combinations_of_a_phone_number) [PHP](src/main/php/g0001_0100/s0017_letter_combinations_of_a_phone_number) [C#](src/main/csharp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Go](src/main/go/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Cpp](src/main/cpp/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Python](src/main/python/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Swift](src/main/swift/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Elixir](src/main/elixir/g0001_0100/s0017_letter_combinations_of_a_phone_number) [Rust](src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Backtracking, Algorithm_II_Day_11_Recursion_Backtracking, Udemy_Backtracking/Recursion, Big_O_Time_O(4^n)_Space_O(n) | 52 | 79.11 +| 0015 |3Sum| [Java](src/main/java/g0001_0100/s0015_3sum) [Kotlin](src/main/kotlin/g0001_0100/s0015_3sum) [TypeScript](src/main/ts/g0001_0100/s0015_3sum) [Scala](src/main/scala/g0001_0100/s0015_3sum) [Ruby](src/main/ruby/g0001_0100/s0015_3sum) [PHP](src/main/php/g0001_0100/s0015_3sum) [C#](src/main/csharp/g0001_0100/s0015_3sum) [Go](src/main/go/g0001_0100/s0015_3sum) [Cpp](src/main/cpp/g0001_0100/s0015_3sum) [Python](src/main/python/g0001_0100/s0015_3sum) [Swift](src/main/swift/g0001_0100/s0015_3sum) [Elixir](src/main/elixir/g0001_0100/s0015_3sum) [Rust](src/main/rust/g0001_0100/s0015_3sum)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Sorting, Two_Pointers, Data_Structure_II_Day_1_Array, Algorithm_II_Day_3_Two_Pointers, Udemy_Two_Pointers, Big_O_Time_O(n\*log(n))_Space_O(n^2) | 148 | 92.62 +| 0011 |Container With Most Water| [Java](src/main/java/g0001_0100/s0011_container_with_most_water) [Kotlin](src/main/kotlin/g0001_0100/s0011_container_with_most_water) [TypeScript](src/main/ts/g0001_0100/s0011_container_with_most_water) [Scala](src/main/scala/g0001_0100/s0011_container_with_most_water) [Ruby](src/main/ruby/g0001_0100/s0011_container_with_most_water) [PHP](src/main/php/g0001_0100/s0011_container_with_most_water) [C#](src/main/csharp/g0001_0100/s0011_container_with_most_water) [Go](src/main/go/g0001_0100/s0011_container_with_most_water) [Cpp](src/main/cpp/g0001_0100/s0011_container_with_most_water) [Python](src/main/python/g0001_0100/s0011_container_with_most_water) [Swift](src/main/swift/g0001_0100/s0011_container_with_most_water) [Elixir](src/main/elixir/g0001_0100/s0011_container_with_most_water) [Rust](src/main/rust/g0001_0100/s0011_container_with_most_water)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Greedy, Two_Pointers, Algorithm_II_Day_4_Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 57 | 98.23 +| 0010 |Regular Expression Matching| [Java](src/main/java/g0001_0100/s0010_regular_expression_matching) [Kotlin](src/main/kotlin/g0001_0100/s0010_regular_expression_matching) [TypeScript](src/main/ts/g0001_0100/s0010_regular_expression_matching) [Scala](src/main/scala/g0001_0100/s0010_regular_expression_matching) [Ruby](src/main/ruby/g0001_0100/s0010_regular_expression_matching) [PHP](src/main/php/g0001_0100/s0010_regular_expression_matching) [C#](src/main/csharp/g0001_0100/s0010_regular_expression_matching) [Go](src/main/go/g0001_0100/s0010_regular_expression_matching) [Cpp](src/main/cpp/g0001_0100/s0010_regular_expression_matching) [Python](src/main/python/g0001_0100/s0010_regular_expression_matching) [Swift](src/main/swift/g0001_0100/s0010_regular_expression_matching) [Elixir](src/main/elixir/g0001_0100/s0010_regular_expression_matching) [Rust](src/main/rust/g0001_0100/s0010_regular_expression_matching)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Recursion, Udemy_Dynamic_Programming, Big_O_Time_O(m\*n)_Space_O(m\*n) | 69 | 92.65 +| 0009 |Palindrome Number| [Java](src/main/java/g0001_0100/s0009_palindrome_number) [Kotlin](src/main/kotlin/g0001_0100/s0009_palindrome_number) [TypeScript](src/main/ts/g0001_0100/s0009_palindrome_number) [Scala](src/main/scala/g0001_0100/s0009_palindrome_number) [Ruby](src/main/ruby/g0001_0100/s0009_palindrome_number) [PHP](src/main/php/g0001_0100/s0009_palindrome_number) [C#](src/main/csharp/g0001_0100/s0009_palindrome_number) [Go](src/main/go/g0001_0100/s0009_palindrome_number) [Cpp](src/main/cpp/g0001_0100/s0009_palindrome_number) [Python](src/main/python/g0001_0100/s0009_palindrome_number) [Swift](src/main/swift/g0001_0100/s0009_palindrome_number) [Elixir](src/main/elixir/g0001_0100/s0009_palindrome_number) [Rust](src/main/rust/g0001_0100/s0009_palindrome_number)| Easy | Math, Udemy_Integers | 137 | 88.64 +| 0008 |String to Integer (atoi)| [Java](src/main/java/g0001_0100/s0008_string_to_integer_atoi) [Kotlin](src/main/kotlin/g0001_0100/s0008_string_to_integer_atoi) [TypeScript](src/main/ts/g0001_0100/s0008_string_to_integer_atoi) [Scala](src/main/scala/g0001_0100/s0008_string_to_integer_atoi) [Ruby](src/main/ruby/g0001_0100/s0008_string_to_integer_atoi) [PHP](src/main/php/g0001_0100/s0008_string_to_integer_atoi) [C#](src/main/csharp/g0001_0100/s0008_string_to_integer_atoi) [Go](src/main/go/g0001_0100/s0008_string_to_integer_atoi) [Cpp](src/main/cpp/g0001_0100/s0008_string_to_integer_atoi) [Python](src/main/python/g0001_0100/s0008_string_to_integer_atoi) [Swift](src/main/swift/g0001_0100/s0008_string_to_integer_atoi) [Elixir](src/main/elixir/g0001_0100/s0008_string_to_integer_atoi) [Rust](src/main/rust/g0001_0100/s0008_string_to_integer_atoi)| Medium | Top_Interview_Questions, String | 56 | 99.01 +| 0007 |Reverse Integer| [Java](src/main/java/g0001_0100/s0007_reverse_integer) [Kotlin](src/main/kotlin/g0001_0100/s0007_reverse_integer) [TypeScript](src/main/ts/g0001_0100/s0007_reverse_integer) [Scala](src/main/scala/g0001_0100/s0007_reverse_integer) [Ruby](src/main/ruby/g0001_0100/s0007_reverse_integer) [PHP](src/main/php/g0001_0100/s0007_reverse_integer) [C#](src/main/csharp/g0001_0100/s0007_reverse_integer) [Go](src/main/go/g0001_0100/s0007_reverse_integer) [Cpp](src/main/cpp/g0001_0100/s0007_reverse_integer) [Python](src/main/python/g0001_0100/s0007_reverse_integer) [Swift](src/main/swift/g0001_0100/s0007_reverse_integer) [Elixir](src/main/elixir/g0001_0100/s0007_reverse_integer) [Rust](src/main/rust/g0001_0100/s0007_reverse_integer)| Medium | Top_Interview_Questions, Math, Udemy_Integers | 56 | 95.68 +| 0006 |Zigzag Conversion| [Java](src/main/java/g0001_0100/s0006_zigzag_conversion) [Kotlin](src/main/kotlin/g0001_0100/s0006_zigzag_conversion) [TypeScript](src/main/ts/g0001_0100/s0006_zigzag_conversion) [Scala](src/main/scala/g0001_0100/s0006_zigzag_conversion) [Ruby](src/main/ruby/g0001_0100/s0006_zigzag_conversion) [PHP](src/main/php/g0001_0100/s0006_zigzag_conversion) [C#](src/main/csharp/g0001_0100/s0006_zigzag_conversion) [Go](src/main/go/g0001_0100/s0006_zigzag_conversion) [Cpp](src/main/cpp/g0001_0100/s0006_zigzag_conversion) [Python](src/main/python/g0001_0100/s0006_zigzag_conversion) [Swift](src/main/swift/g0001_0100/s0006_zigzag_conversion) [Elixir](src/main/elixir/g0001_0100/s0006_zigzag_conversion) [Rust](src/main/rust/g0001_0100/s0006_zigzag_conversion)| Medium | String | 64 | 95.38 +| 0005 |Longest Palindromic Substring| [Java](src/main/java/g0001_0100/s0005_longest_palindromic_substring) [Kotlin](src/main/kotlin/g0001_0100/s0005_longest_palindromic_substring) [TypeScript](src/main/ts/g0001_0100/s0005_longest_palindromic_substring) [Scala](src/main/scala/g0001_0100/s0005_longest_palindromic_substring) [Ruby](src/main/ruby/g0001_0100/s0005_longest_palindromic_substring) [PHP](src/main/php/g0001_0100/s0005_longest_palindromic_substring) [C#](src/main/csharp/g0001_0100/s0005_longest_palindromic_substring) [Go](src/main/go/g0001_0100/s0005_longest_palindromic_substring) [Cpp](src/main/cpp/g0001_0100/s0005_longest_palindromic_substring) [Python](src/main/python/g0001_0100/s0005_longest_palindromic_substring) [Swift](src/main/swift/g0001_0100/s0005_longest_palindromic_substring) [Elixir](src/main/elixir/g0001_0100/s0005_longest_palindromic_substring) [Rust](src/main/rust/g0001_0100/s0005_longest_palindromic_substring)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Dynamic_Programming, Data_Structure_II_Day_9_String, Algorithm_II_Day_14_Dynamic_Programming, Dynamic_Programming_I_Day_17, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 68 | 95.34 +| 0004 |Median of Two Sorted Arrays| [Java](src/main/java/g0001_0100/s0004_median_of_two_sorted_arrays) [Kotlin](src/main/kotlin/g0001_0100/s0004_median_of_two_sorted_arrays) [TypeScript](src/main/ts/g0001_0100/s0004_median_of_two_sorted_arrays) [Scala](src/main/scala/g0001_0100/s0004_median_of_two_sorted_arrays) [Ruby](src/main/ruby/g0001_0100/s0004_median_of_two_sorted_arrays) [PHP](src/main/php/g0001_0100/s0004_median_of_two_sorted_arrays) [C#](src/main/csharp/g0001_0100/s0004_median_of_two_sorted_arrays) [Go](src/main/go/g0001_0100/s0004_median_of_two_sorted_arrays) [Cpp](src/main/cpp/g0001_0100/s0004_median_of_two_sorted_arrays) [Python](src/main/python/g0001_0100/s0004_median_of_two_sorted_arrays) [Swift](src/main/swift/g0001_0100/s0004_median_of_two_sorted_arrays) [Elixir](src/main/elixir/g0001_0100/s0004_median_of_two_sorted_arrays) [Rust](src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays)| Hard | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Divide_and_Conquer, Big_O_Time_O(log(min(N,M)))_Space_O(1) | 86 | 92.15 +| 0003 |Longest Substring Without Repeating Characters| [Java](src/main/java/g0001_0100/s0003_longest_substring_without_repeating_characters) [Kotlin](src/main/kotlin/g0001_0100/s0003_longest_substring_without_repeating_characters) [TypeScript](src/main/ts/g0001_0100/s0003_longest_substring_without_repeating_characters) [Scala](src/main/scala/g0001_0100/s0003_longest_substring_without_repeating_characters) [Ruby](src/main/ruby/g0001_0100/s0003_longest_substring_without_repeating_characters) [PHP](src/main/php/g0001_0100/s0003_longest_substring_without_repeating_characters) [C#](src/main/csharp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Go](src/main/go/g0001_0100/s0003_longest_substring_without_repeating_characters) [Cpp](src/main/cpp/g0001_0100/s0003_longest_substring_without_repeating_characters) [Python](src/main/python/g0001_0100/s0003_longest_substring_without_repeating_characters) [Swift](src/main/swift/g0001_0100/s0003_longest_substring_without_repeating_characters) [Elixir](src/main/elixir/g0001_0100/s0003_longest_substring_without_repeating_characters) [Rust](src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, String, Hash_Table, Sliding_Window, Algorithm_I_Day_6_Sliding_Window, Level_2_Day_14_Sliding_Window/Two_Pointer, Udemy_Strings, Big_O_Time_O(n)_Space_O(1) | 65 | 90.77 +| 0002 |Add Two Numbers| [Java](src/main/java/g0001_0100/s0002_add_two_numbers) [Kotlin](src/main/kotlin/g0001_0100/s0002_add_two_numbers) [TypeScript](src/main/ts/g0001_0100/s0002_add_two_numbers) [Scala](src/main/scala/g0001_0100/s0002_add_two_numbers) [Ruby](src/main/ruby/g0001_0100/s0002_add_two_numbers) [PHP](src/main/php/g0001_0100/s0002_add_two_numbers) [C#](src/main/csharp/g0001_0100/s0002_add_two_numbers) [Go](src/main/go/g0001_0100/s0002_add_two_numbers) [Cpp](src/main/cpp/g0001_0100/s0002_add_two_numbers) [Python](src/main/python/g0001_0100/s0002_add_two_numbers) [Swift](src/main/swift/g0001_0100/s0002_add_two_numbers) [Elixir](src/main/elixir/g0001_0100/s0002_add_two_numbers) [Rust](src/main/rust/g0001_0100/s0002_add_two_numbers)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Math, Linked_List, Recursion, Data_Structure_II_Day_10_Linked_List, Programming_Skills_II_Day_15, Big_O_Time_O(max(N,M))_Space_O(max(N,M)) | 92 | 77.86 +| 0001 |Two Sum| [Java](src/main/java/g0001_0100/s0001_two_sum) [Kotlin](src/main/kotlin/g0001_0100/s0001_two_sum) [TypeScript](src/main/ts/g0001_0100/s0001_two_sum) [Scala](src/main/scala/g0001_0100/s0001_two_sum) [Ruby](src/main/ruby/g0001_0100/s0001_two_sum) [PHP](src/main/php/g0001_0100/s0001_two_sum) [C#](src/main/csharp/g0001_0100/s0001_two_sum) [Go](src/main/go/g0001_0100/s0001_two_sum) [Cpp](src/main/cpp/g0001_0100/s0001_two_sum) [Python](src/main/python/g0001_0100/s0001_two_sum) [Swift](src/main/swift/g0001_0100/s0001_two_sum) [Elixir](src/main/elixir/g0001_0100/s0001_two_sum) [Rust](src/main/rust/g0001_0100/s0001_two_sum)| Easy | Top_100_Liked_Questions, Top_Interview_Questions, Array, Hash_Table, Data_Structure_I_Day_2_Array, Level_1_Day_13_Hashmap, Udemy_Arrays, Big_O_Time_O(n)_Space_O(n) | 54 | 91.72 ## Contributing Your ideas/fixes/algorithms are more than welcome! diff --git a/src/main/rust/g0001_0100/s0001_two_sum/Solution.rs b/src/main/rust/g0001_0100/s0001_two_sum/Solution.rs new file mode 100644 index 0000000..3648197 --- /dev/null +++ b/src/main/rust/g0001_0100/s0001_two_sum/Solution.rs @@ -0,0 +1,21 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table +// #Data_Structure_I_Day_2_Array #Level_1_Day_13_Hashmap #Udemy_Arrays #Big_O_Time_O(n)_Space_O(n) +// #2024_08_24_Time_0_ms_(100.00%)_Space_2.4_MB_(23.16%) + +use std::collections::HashMap; + +impl Solution { + pub fn two_sum(numbers: Vec, target: i32) -> Vec { + let mut index_map: HashMap = HashMap::new(); + + for (i, &num) in numbers.iter().enumerate() { + let required_num = target - num; + if let Some(&index) = index_map.get(&required_num) { + return vec![index as i32, i as i32]; + } + index_map.insert(num, i); + } + + vec![-1, -1] + } +} diff --git a/src/main/rust/g0001_0100/s0001_two_sum/readme.md b/src/main/rust/g0001_0100/s0001_two_sum/readme.md new file mode 100644 index 0000000..f99ffe3 --- /dev/null +++ b/src/main/rust/g0001_0100/s0001_two_sum/readme.md @@ -0,0 +1,38 @@ +1\. Two Sum + +Easy + +Given an array of integers `nums` and an integer `target`, return _indices of the two numbers such that they add up to `target`_. + +You may assume that each input would have **_exactly_ one solution**, and you may not use the _same_ element twice. + +You can return the answer in any order. + +**Example 1:** + +**Input:** nums = [2,7,11,15], target = 9 + +**Output:** [0,1] + +**Output:** Because nums[0] + nums[1] == 9, we return [0, 1]. + +**Example 2:** + +**Input:** nums = [3,2,4], target = 6 + +**Output:** [1,2] + +**Example 3:** + +**Input:** nums = [3,3], target = 6 + +**Output:** [0,1] + +**Constraints:** + +* 2 <= nums.length <= 104 +* -109 <= nums[i] <= 109 +* -109 <= target <= 109 +* **Only one valid answer exists.** + +**Follow-up:** Can you come up with an algorithm that is less than O(n2) time complexity? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0002_add_two_numbers/Solution.rs b/src/main/rust/g0001_0100/s0002_add_two_numbers/Solution.rs new file mode 100644 index 0000000..9a724e7 --- /dev/null +++ b/src/main/rust/g0001_0100/s0002_add_two_numbers/Solution.rs @@ -0,0 +1,54 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Math #Linked_List #Recursion +// #Data_Structure_II_Day_10_Linked_List #Programming_Skills_II_Day_15 +// #Big_O_Time_O(max(N,M))_Space_O(max(N,M)) #2024_08_24_Time_0_ms_(100.00%)_Space_2.2_MB_(14.25%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn add_two_numbers( + l1: Option>, + l2: Option> + ) -> Option> { + let mut p = l1; + let mut q = l2; + let mut dummy_head = Box::new(ListNode::new(0)); + let mut curr = &mut dummy_head; + let mut carry = 0; + + while p.is_some() || q.is_some() { + let x = p.as_ref().map_or(0, |node| node.val); + let y = q.as_ref().map_or(0, |node| node.val); + let sum = carry + x + y; + carry = sum / 10; + curr.next = Some(Box::new(ListNode::new(sum % 10))); + curr = curr.next.as_mut().unwrap(); + + if let Some(node) = p { + p = node.next; + } + if let Some(node) = q { + q = node.next; + } + } + + if carry > 0 { + curr.next = Some(Box::new(ListNode::new(carry))); + } + + dummy_head.next + } +} diff --git a/src/main/rust/g0001_0100/s0002_add_two_numbers/readme.md b/src/main/rust/g0001_0100/s0002_add_two_numbers/readme.md new file mode 100644 index 0000000..6e67c19 --- /dev/null +++ b/src/main/rust/g0001_0100/s0002_add_two_numbers/readme.md @@ -0,0 +1,35 @@ +2\. Add Two Numbers + +Medium + +You are given two **non-empty** linked lists representing two non-negative integers. The digits are stored in **reverse order**, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. + +You may assume the two numbers do not contain any leading zero, except the number 0 itself. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/02/addtwonumber1.jpg) + +**Input:** l1 = [2,4,3], l2 = [5,6,4] + +**Output:** [7,0,8] + +**Explanation:** 342 + 465 = 807. + +**Example 2:** + +**Input:** l1 = [0], l2 = [0] + +**Output:** [0] + +**Example 3:** + +**Input:** l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9] + +**Output:** [8,9,9,9,0,0,0,1] + +**Constraints:** + +* The number of nodes in each linked list is in the range `[1, 100]`. +* `0 <= Node.val <= 9` +* It is guaranteed that the list represents a number that does not have leading zeros. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/Solution.rs b/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/Solution.rs new file mode 100644 index 0000000..851f399 --- /dev/null +++ b/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/Solution.rs @@ -0,0 +1,36 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Sliding_Window +// #Algorithm_I_Day_6_Sliding_Window #Level_2_Day_14_Sliding_Window/Two_Pointer #Udemy_Strings +// #Big_O_Time_O(n)_Space_O(1) #2024_08_24_Time_0_ms_(100.00%)_Space_2.3_MB_(28.72%) + +impl Solution { + pub fn length_of_longest_substring(s: String) -> i32 { + // Array to store last seen indices of characters + let mut last_indices = [-1; 256]; + let mut max_len = 0; + let mut cur_len = 0; + let mut start = 0; + + // Convert string to bytes to use indexing + let bytes = s.as_bytes(); + for (i, &cur) in bytes.iter().enumerate() { + // Cast byte to usize to use as an index + let cur = cur as usize; + + if last_indices[cur] < start as i32 { + last_indices[cur] = i as i32; + cur_len += 1; + } else { + let last_index = last_indices[cur]; + start = (last_index + 1) as usize; + cur_len = i - start + 1; + last_indices[cur] = i as i32; + } + + if cur_len > max_len { + max_len = cur_len; + } + } + + max_len as i32 + } +} diff --git a/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/readme.md b/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/readme.md new file mode 100644 index 0000000..bf1ef46 --- /dev/null +++ b/src/main/rust/g0001_0100/s0003_longest_substring_without_repeating_characters/readme.md @@ -0,0 +1,40 @@ +3\. Longest Substring Without Repeating Characters + +Medium + +Given a string `s`, find the length of the **longest substring** without repeating characters. + +**Example 1:** + +**Input:** s = "abcabcbb" + +**Output:** 3 + +**Explanation:** The answer is "abc", with the length of 3. + +**Example 2:** + +**Input:** s = "bbbbb" + +**Output:** 1 + +**Explanation:** The answer is "b", with the length of 1. + +**Example 3:** + +**Input:** s = "pwwkew" + +**Output:** 3 + +**Explanation:** The answer is "wke", with the length of 3. Notice that the answer must be a substring, "pwke" is a subsequence and not a substring. + +**Example 4:** + +**Input:** s = "" + +**Output:** 0 + +**Constraints:** + +* 0 <= s.length <= 5 * 104 +* `s` consists of English letters, digits, symbols and spaces. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/Solution.rs b/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/Solution.rs new file mode 100644 index 0000000..9bcc534 --- /dev/null +++ b/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/Solution.rs @@ -0,0 +1,44 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Array #Binary_Search #Divide_and_Conquer +// #Big_O_Time_O(log(min(N,M)))_Space_O(1) #2024_08_24_Time_0_ms_(100.00%)_Space_2.2_MB_(39.80%) + +impl Solution { + pub fn find_median_sorted_arrays(nums1: Vec, nums2: Vec) -> f64 { + let (nums1, nums2) = if nums1.len() > nums2.len() { + // Ensures nums1 is the smaller array + (nums2, nums1) + } else { + (nums1, nums2) + }; + + let n1 = nums1.len(); + let n2 = nums2.len(); + let mut low = 0; + let mut high = n1; + + while low <= high { + let cut1 = (low + high) / 2; + let cut2 = (n1 + n2 + 1) / 2 - cut1; + + let l1 = if cut1 == 0 { i32::MIN } else { nums1[cut1 - 1] }; + let l2 = if cut2 == 0 { i32::MIN } else { nums2[cut2 - 1] }; + let r1 = if cut1 == n1 { i32::MAX } else { nums1[cut1] }; + let r2 = if cut2 == n2 { i32::MAX } else { nums2[cut2] }; + + if l1 <= r2 && l2 <= r1 { + // Found the correct partition + if (n1 + n2) % 2 == 0 { + return (f64::from(l1.max(l2)) + f64::from(r1.min(r2))) / 2.0; + } else { + return f64::from(l1.max(l2)); + } + } else if l1 > r2 { + high = cut1 - 1; + } else { + low = cut1 + 1; + } + } + + // Fallback case, should never hit + 0.0 + } +} diff --git a/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/readme.md b/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/readme.md new file mode 100644 index 0000000..a463374 --- /dev/null +++ b/src/main/rust/g0001_0100/s0004_median_of_two_sorted_arrays/readme.md @@ -0,0 +1,50 @@ +4\. Median of Two Sorted Arrays + +Hard + +Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return **the median** of the two sorted arrays. + +The overall run time complexity should be `O(log (m+n))`. + +**Example 1:** + +**Input:** nums1 = [1,3], nums2 = [2] + +**Output:** 2.00000 + +**Explanation:** merged array = [1,2,3] and median is 2. + +**Example 2:** + +**Input:** nums1 = [1,2], nums2 = [3,4] + +**Output:** 2.50000 + +**Explanation:** merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5. + +**Example 3:** + +**Input:** nums1 = [0,0], nums2 = [0,0] + +**Output:** 0.00000 + +**Example 4:** + +**Input:** nums1 = [], nums2 = [1] + +**Output:** 1.00000 + +**Example 5:** + +**Input:** nums1 = [2], nums2 = [] + +**Output:** 2.00000 + +**Constraints:** + +* `nums1.length == m` +* `nums2.length == n` +* `0 <= m <= 1000` +* `0 <= n <= 1000` +* `1 <= m + n <= 2000` +* -106 <= nums1[i], nums2[i] <= 106 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/Solution.rs b/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/Solution.rs new file mode 100644 index 0000000..fabb56b --- /dev/null +++ b/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/Solution.rs @@ -0,0 +1,56 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Dynamic_Programming +// #Data_Structure_II_Day_9_String #Algorithm_II_Day_14_Dynamic_Programming +// #Dynamic_Programming_I_Day_17 #Udemy_Strings #Big_O_Time_O(n)_Space_O(n) +// #2024_08_24_Time_1_ms_(92.60%)_Space_2.2_MB_(20.49%) + +impl Solution { + pub fn longest_palindrome(s: String) -> String { + let n = s.len(); + if n == 0 { + return String::new(); + } + + // Step 1: Transform the string to avoid even/odd length issues + let mut new_str = Vec::with_capacity(n * 2 + 1); + new_str.push('#'); + for c in s.chars() { + new_str.push(c); + new_str.push('#'); + } + + let m = new_str.len(); + let mut dp = vec![0; m]; + let mut friend_center = 0; + let mut friend_radius = 0; + let mut lps_center = 0; + let mut lps_radius = 0; + + // Step 2: Apply Manacher's Algorithm + for i in 0..m { + dp[i] = if friend_center + friend_radius > i { + dp[2 * friend_center - i].min(friend_center + friend_radius - i) + } else { + 1 + }; + + while i + dp[i] < m && i >= dp[i] && new_str[i + dp[i]] == new_str[i - dp[i]] { + dp[i] += 1; + } + + if friend_center + friend_radius < i + dp[i] { + friend_center = i; + friend_radius = dp[i]; + } + + if lps_radius < dp[i] { + lps_center = i; + lps_radius = dp[i]; + } + } + + // Step 3: Extract the longest palindromic substring + let start = (lps_center - lps_radius + 1) / 2; + let end = (lps_center + lps_radius - 1) / 2; + s[start..end].to_string() + } +} diff --git a/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/readme.md b/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/readme.md new file mode 100644 index 0000000..883ff5c --- /dev/null +++ b/src/main/rust/g0001_0100/s0005_longest_palindromic_substring/readme.md @@ -0,0 +1,34 @@ +5\. Longest Palindromic Substring + +Medium + +Given a string `s`, return _the longest palindromic substring_ in `s`. + +**Example 1:** + +**Input:** s = "babad" + +**Output:** "bab" **Note:** "aba" is also a valid answer. + +**Example 2:** + +**Input:** s = "cbbd" + +**Output:** "bb" + +**Example 3:** + +**Input:** s = "a" + +**Output:** "a" + +**Example 4:** + +**Input:** s = "ac" + +**Output:** "a" + +**Constraints:** + +* `1 <= s.length <= 1000` +* `s` consist of only digits and English letters. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0006_zigzag_conversion/Solution.rs b/src/main/rust/g0001_0100/s0006_zigzag_conversion/Solution.rs new file mode 100644 index 0000000..f6d9ce6 --- /dev/null +++ b/src/main/rust/g0001_0100/s0006_zigzag_conversion/Solution.rs @@ -0,0 +1,33 @@ +// #Medium #String #2024_09_04_Time_0_ms_(100.00%)_Space_2.1_MB_(94.72%) + +impl Solution { + pub fn convert(s: String, num_rows: i32) -> String { + let num_rows = num_rows as usize; + if num_rows == 1 || s.len() < num_rows { + return s; + } + + let mut result = String::with_capacity(s.len()); + let s_bytes = s.as_bytes(); + let complete_jump = 2 * (num_rows - 1); + + for row in 0..num_rows { + let mut index = row; + let zig_jump = 2 * (num_rows - 1 - row); + let zag_jump = complete_jump - zig_jump; + let mut use_zig_jump = true; + + while index < s.len() { + result.push(s_bytes[index] as char); + if row == 0 || row == num_rows - 1 { + index += complete_jump; + } else { + index += if use_zig_jump { zig_jump } else { zag_jump }; + use_zig_jump = !use_zig_jump; + } + } + } + + result + } +} diff --git a/src/main/rust/g0001_0100/s0006_zigzag_conversion/readme.md b/src/main/rust/g0001_0100/s0006_zigzag_conversion/readme.md new file mode 100644 index 0000000..4f55d57 --- /dev/null +++ b/src/main/rust/g0001_0100/s0006_zigzag_conversion/readme.md @@ -0,0 +1,39 @@ +6\. Zigzag Conversion + +Medium + +The string `"PAYPALISHIRING"` is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) + +P A H N A P L S I I G Y I R + +And then read line by line: `"PAHNAPLSIIGYIR"` + +Write the code that will take a string and make this conversion given a number of rows: + +string convert(string s, int numRows); + +**Example 1:** + +**Input:** s = "PAYPALISHIRING", numRows = 3 + +**Output:** "PAHNAPLSIIGYIR" + +**Example 2:** + +**Input:** s = "PAYPALISHIRING", numRows = 4 + +**Output:** "PINALSIGYAHRPI" + +**Explanation:** P I N A L S I G Y A H R P I + +**Example 3:** + +**Input:** s = "A", numRows = 1 + +**Output:** "A" + +**Constraints:** + +* `1 <= s.length <= 1000` +* `s` consists of English letters (lower-case and upper-case), `','` and `'.'`. +* `1 <= numRows <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0007_reverse_integer/Solution.rs b/src/main/rust/g0001_0100/s0007_reverse_integer/Solution.rs new file mode 100644 index 0000000..8d666fa --- /dev/null +++ b/src/main/rust/g0001_0100/s0007_reverse_integer/Solution.rs @@ -0,0 +1,20 @@ +// #Medium #Top_Interview_Questions #Math #Udemy_Integers +// #2024_09_04_Time_0_ms_(100.00%)_Space_2.1_MB_(18.54%) + +impl Solution { + pub fn reverse(x: i32) -> i32 { + let mut x = x; + let mut rev: i64 = 0; // Use i64 to handle overflow + + while x != 0 { + rev = rev * 10 + (x % 10) as i64; + x /= 10; + } + + if rev > i32::MAX as i64 || rev < i32::MIN as i64 { + return 0; + } + + rev as i32 + } +} diff --git a/src/main/rust/g0001_0100/s0007_reverse_integer/readme.md b/src/main/rust/g0001_0100/s0007_reverse_integer/readme.md new file mode 100644 index 0000000..81dbb62 --- /dev/null +++ b/src/main/rust/g0001_0100/s0007_reverse_integer/readme.md @@ -0,0 +1,35 @@ +7\. Reverse Integer + +Medium + +Given a signed 32-bit integer `x`, return `x` _with its digits reversed_. If reversing `x` causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return `0`. + +**Assume the environment does not allow you to store 64-bit integers (signed or unsigned).** + +**Example 1:** + +**Input:** x = 123 + +**Output:** 321 + +**Example 2:** + +**Input:** x = -123 + +**Output:** -321 + +**Example 3:** + +**Input:** x = 120 + +**Output:** 21 + +**Example 4:** + +**Input:** x = 0 + +**Output:** 0 + +**Constraints:** + +* -231 <= x <= 231 - 1 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/Solution.rs b/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/Solution.rs new file mode 100644 index 0000000..fc364ff --- /dev/null +++ b/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/Solution.rs @@ -0,0 +1,52 @@ +// #Medium #Top_Interview_Questions #String #2024_09_04_Time_0_ms_(100.00%)_Space_2.1_MB_(82.19%) + +impl Solution { + pub fn my_atoi(str: String) -> i32 { + let mut chars = str.chars().peekable(); + let mut i = 0; + let mut negative_sign = false; + let mut num: i32 = 0; + + // Skip leading whitespaces + while let Some(&ch) = chars.peek() { + if ch == ' ' { + chars.next(); + } else { + break; + } + } + + // Handle sign + if let Some(&ch) = chars.peek() { + if ch == '+' { + chars.next(); + } else if ch == '-' { + chars.next(); + negative_sign = true; + } + } + + // Convert characters to integer + while let Some(&ch) = chars.peek() { + if ch >= '0' && ch <= '9' { + chars.next(); + let digit = ch.to_digit(10).unwrap() as i32; + let digit = if negative_sign { -digit } else { digit }; + + // Check for overflow/underflow + if num > i32::MAX / 10 || (num == i32::MAX / 10 && digit > 7) { + return i32::MAX; + } + if num < i32::MIN / 10 || (num == i32::MIN / 10 && digit < -8) { + return i32::MIN; + } + + num = num * 10 + digit; + } else { + break; + } + } + + num + } +} diff --git a/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/readme.md b/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/readme.md new file mode 100644 index 0000000..af67f64 --- /dev/null +++ b/src/main/rust/g0001_0100/s0008_string_to_integer_atoi/readme.md @@ -0,0 +1,113 @@ +8\. String to Integer (atoi) + +Medium + +Implement the `myAtoi(string s)` function, which converts a string to a 32-bit signed integer (similar to C/C++'s `atoi` function). + +The algorithm for `myAtoi(string s)` is as follows: + +1. Read in and ignore any leading whitespace. +2. Check if the next character (if not already at the end of the string) is `'-'` or `'+'`. Read this character in if it is either. This determines if the final result is negative or positive respectively. Assume the result is positive if neither is present. +3. Read in next the characters until the next non-digit character or the end of the input is reached. The rest of the string is ignored. +4. Convert these digits into an integer (i.e. `"123" -> 123`, `"0032" -> 32`). If no digits were read, then the integer is `0`. Change the sign as necessary (from step 2). +5. If the integer is out of the 32-bit signed integer range [-231, 231 - 1], then clamp the integer so that it remains in the range. Specifically, integers less than -231 should be clamped to -231, and integers greater than 231 - 1 should be clamped to 231 - 1. +6. Return the integer as the final result. + +**Note:** + +* Only the space character `' '` is considered a whitespace character. +* **Do not ignore** any characters other than the leading whitespace or the rest of the string after the digits. + +**Example 1:** + +**Input:** s = "42" + +**Output:** 42 + +**Explanation:** The underlined characters are what is read in, the caret is the current reader position. + + Step 1: "42" (no characters read because there is no leading whitespace) + ^ + Step 2: "42" (no characters read because there is neither a '-' nor '+') + ^ + Step 3: "42" ("42" is read in) + ^ + +The parsed integer is 42. Since 42 is in the range [-231, 231 - 1], the final result is 42. + +**Example 2:** + +**Input:** s = " -42" + +**Output:** -42 + +**Explanation:** + + Step 1: " -42" (leading whitespace is read and ignored) + ^ + Step 2: " -42" ('-' is read, so the result should be negative) + ^ + Step 3: " -42" ("42" is read in) + ^ + The parsed integer is -42. + +Since -42 is in the range [-231, 231 - 1], the final result is -42. + +**Example 3:** + +**Input:** s = "4193 with words" + +**Output:** 4193 + +**Explanation:** + + Step 1: "4193 with words" (no characters read because there is no leading whitespace) + ^ + Step 2: "4193 with words" (no characters read because there is neither a '-' nor '+') + ^ + Step 3: "4193 with words" ("4193" is read in; reading stops because the next character is a non-digit) + ^ + The parsed integer is 4193. + +Since 4193 is in the range [-231, 231 - 1], the final result is 4193. + +**Example 4:** + +**Input:** s = "words and 987" + +**Output:** 0 + +**Explanation:** + + Step 1: "words and 987" (no characters read because there is no leading whitespace) + ^ + Step 2: "words and 987" (no characters read because there is neither a '-' nor '+') + ^ + Step 3: "words and 987" (reading stops immediately because there is a non-digit 'w') + ^ + The parsed integer is 0 because no digits were read. + +Since 0 is in the range [-231, 231 - 1], the final result is 0. + +**Example 5:** + +**Input:** s = "-91283472332" + +**Output:** -2147483648 + +**Explanation:** + + Step 1: "-91283472332" (no characters read because there is no leading whitespace) + ^ + Step 2: "-91283472332" ('-' is read, so the result should be negative) + ^ + Step 3: "-91283472332" ("91283472332" is read in) + ^ + The parsed integer is -91283472332. + +Since -91283472332 is less than the lower bound of the range [-231, 231 - 1], the final result is clamped to -231 = -2147483648. + +**Constraints:** + +* `0 <= s.length <= 200` +* `s` consists of English letters (lower-case and upper-case), digits (`0-9`), `' '`, `'+'`, `'-'`, and `'.'`. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0009_palindrome_number/Solution.rs b/src/main/rust/g0001_0100/s0009_palindrome_number/Solution.rs new file mode 100644 index 0000000..114d7ce --- /dev/null +++ b/src/main/rust/g0001_0100/s0009_palindrome_number/Solution.rs @@ -0,0 +1,22 @@ +// #Easy #Math #Udemy_Integers #2024_09_04_Time_0_ms_(100.00%)_Space_2_MB_(83.29%) + +impl Solution { + pub fn is_palindrome(x: i32) -> bool { + // Negative numbers are not palindromes + if x < 0 { + return false; + } + + let mut rev = 0; + let mut local_x = x; + + // Reverse the integer + while local_x > 0 { + rev = rev * 10 + local_x % 10; + local_x /= 10; + } + + // Check if the reversed integer is the same as the original + rev == x + } +} diff --git a/src/main/rust/g0001_0100/s0009_palindrome_number/readme.md b/src/main/rust/g0001_0100/s0009_palindrome_number/readme.md new file mode 100644 index 0000000..f05939b --- /dev/null +++ b/src/main/rust/g0001_0100/s0009_palindrome_number/readme.md @@ -0,0 +1,41 @@ +9\. Palindrome Number + +Easy + +Given an integer `x`, return `true` if `x` is palindrome integer. + +An integer is a **palindrome** when it reads the same backward as forward. For example, `121` is palindrome while `123` is not. + +**Example 1:** + +**Input:** x = 121 + +**Output:** true + +**Example 2:** + +**Input:** x = -121 + +**Output:** false + +**Explanation:** From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome. + +**Example 3:** + +**Input:** x = 10 + +**Output:** false + +**Explanation:** Reads 01 from right to left. Therefore it is not a palindrome. + +**Example 4:** + +**Input:** x = -101 + +**Output:** false + +**Constraints:** + +* -231 <= x <= 231 - 1 + +**Follow up:** Could you solve it without converting the integer to a string? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0010_regular_expression_matching/Solution.rs b/src/main/rust/g0001_0100/s0010_regular_expression_matching/Solution.rs new file mode 100644 index 0000000..09c3be7 --- /dev/null +++ b/src/main/rust/g0001_0100/s0010_regular_expression_matching/Solution.rs @@ -0,0 +1,44 @@ +// #Hard #Top_Interview_Questions #String #Dynamic_Programming #Recursion #Udemy_Dynamic_Programming +// #Big_O_Time_O(m*n)_Space_O(m*n) #2024_09_04_Time_0_ms_(100.00%)_Space_2.1_MB_(25.55%) + +impl Solution { + pub fn is_match(s: String, p: String) -> bool { + is_match_dp(s.as_bytes(), p.as_bytes()) + } +} + +pub fn is_match_dp(s: &[u8], p: &[u8]) -> bool { + let mut grid = vec![vec![false; s.len() + 1]; p.len() + 1]; + grid[p.len()][s.len()] = true; + + let mut pi = p.len(); + while pi > 0 { + pi -= 1; + + let mstar = pi > 0 && p[pi] == b'*'; + if mstar { + pi -= 1; + } + + for si in 0..=s.len() { + let is_match = if mstar { + let mut si2 = si; + loop { + if grid[pi + 2][si2] { + break true; + } + if si2 < s.len() && (p[pi] == b'.' || s[si2] == p[pi]) { + si2 += 1; + continue; + } + break false; + } + } else { + si < s.len() && (p[pi] == b'.' || s[si] == p[pi]) && grid[pi + 1][si + 1] + }; + grid[pi][si] = is_match; + } + } + + grid[0][0] +} diff --git a/src/main/rust/g0001_0100/s0010_regular_expression_matching/readme.md b/src/main/rust/g0001_0100/s0010_regular_expression_matching/readme.md new file mode 100644 index 0000000..f614e74 --- /dev/null +++ b/src/main/rust/g0001_0100/s0010_regular_expression_matching/readme.md @@ -0,0 +1,56 @@ +10\. Regular Expression Matching + +Hard + +Given an input string `s` and a pattern `p`, implement regular expression matching with support for `'.'` and `'*'` where: + +* `'.'` Matches any single character. +* `'*'` Matches zero or more of the preceding element. + +The matching should cover the **entire** input string (not partial). + +**Example 1:** + +**Input:** s = "aa", p = "a" + +**Output:** false + +**Explanation:** "a" does not match the entire string "aa". + +**Example 2:** + +**Input:** s = "aa", p = "a\*" + +**Output:** true + +**Explanation:** '\*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa". + +**Example 3:** + +**Input:** s = "ab", p = ".\*" + +**Output:** true + +**Explanation:** ".\*" means "zero or more (\*) of any character (.)". + +**Example 4:** + +**Input:** s = "aab", p = "c\*a\*b" + +**Output:** true + +**Explanation:** c can be repeated 0 times, a can be repeated 1 time. Therefore, it matches "aab". + +**Example 5:** + +**Input:** s = "mississippi", p = "mis\*is\*p\*." + +**Output:** false + +**Constraints:** + +* `1 <= s.length <= 20` +* `1 <= p.length <= 30` +* `s` contains only lowercase English letters. +* `p` contains only lowercase English letters, `'.'`, and `'*'`. +* It is guaranteed for each appearance of the character `'*'`, there will be a previous valid character to match. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0011_container_with_most_water/Solution.rs b/src/main/rust/g0001_0100/s0011_container_with_most_water/Solution.rs new file mode 100644 index 0000000..9d3a1a6 --- /dev/null +++ b/src/main/rust/g0001_0100/s0011_container_with_most_water/Solution.rs @@ -0,0 +1,24 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Greedy #Two_Pointers +// #Algorithm_II_Day_4_Two_Pointers #Big_O_Time_O(n)_Space_O(1) +// #2024_09_04_Time_4_ms_(95.02%)_Space_2.9_MB_(95.02%) + +impl Solution { + pub fn max_area(height: Vec) -> i32 { + let mut max_area = 0; + let mut left = 0; + let mut right = height.len() as i32 - 1; + while left < right { + let h_left = height[left as usize]; + let h_right = height[right as usize]; + + if h_left < h_right { + max_area = max_area.max(h_left * (right - left)); + left += 1; + } else { + max_area = max_area.max(h_right * (right - left)); + right -= 1; + } + } + max_area + } +} diff --git a/src/main/rust/g0001_0100/s0011_container_with_most_water/readme.md b/src/main/rust/g0001_0100/s0011_container_with_most_water/readme.md new file mode 100644 index 0000000..5678844 --- /dev/null +++ b/src/main/rust/g0001_0100/s0011_container_with_most_water/readme.md @@ -0,0 +1,41 @@ +11\. Container With Most Water + +Medium + +Given `n` non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). `n` vertical lines are drawn such that the two endpoints of the line `i` is at (i, ai) and `(i, 0)`. Find two lines, which, together with the x-axis forms a container, such that the container contains the most water. + +**Notice** that you may not slant the container. + +**Example 1:** + +![](https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg) + +**Input:** height = [1,8,6,2,5,4,8,3,7] + +**Output:** 49 + +**Explanation:** The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain is 49. + +**Example 2:** + +**Input:** height = [1,1] + +**Output:** 1 + +**Example 3:** + +**Input:** height = [4,3,2,1,4] + +**Output:** 16 + +**Example 4:** + +**Input:** height = [1,2,1] + +**Output:** 2 + +**Constraints:** + +* `n == height.length` +* 2 <= n <= 105 +* 0 <= height[i] <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0015_3sum/Solution.rs b/src/main/rust/g0001_0100/s0015_3sum/Solution.rs new file mode 100644 index 0000000..f68cc6a --- /dev/null +++ b/src/main/rust/g0001_0100/s0015_3sum/Solution.rs @@ -0,0 +1,46 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Sorting #Two_Pointers +// #Data_Structure_II_Day_1_Array #Algorithm_II_Day_3_Two_Pointers #Udemy_Two_Pointers +// #Big_O_Time_O(n*log(n))_Space_O(n^2) #2024_09_04_Time_27_ms_(81.94%)_Space_4.1_MB_(55.03%) + +impl Solution { + pub fn three_sum(nums: Vec) -> Vec> { + let mut nums = nums.clone(); + nums.sort(); + let len = nums.len(); + let mut result = Vec::new(); + + for i in 0..len - 2 { + if i > 0 && nums[i] == nums[i - 1] { + continue; + } + + let mut l = i + 1; + let mut r = len - 1; + + while l < r { + let sum = nums[i] + nums[l] + nums[r]; + + if sum < 0 { + l += 1; + } else if sum > 0 { + r -= 1; + } else { + result.push(vec![nums[i], nums[l], nums[r]]); + + while l < r && nums[l] == nums[l + 1] { + l += 1; + } + + while l < r && nums[r] == nums[r - 1] { + r -= 1; + } + + l += 1; + r -= 1; + } + } + } + + result + } +} diff --git a/src/main/rust/g0001_0100/s0015_3sum/readme.md b/src/main/rust/g0001_0100/s0015_3sum/readme.md new file mode 100644 index 0000000..5a76027 --- /dev/null +++ b/src/main/rust/g0001_0100/s0015_3sum/readme.md @@ -0,0 +1,30 @@ +15\. 3Sum + +Medium + +Given an integer array nums, return all the triplets `[nums[i], nums[j], nums[k]]` such that `i != j`, `i != k`, and `j != k`, and `nums[i] + nums[j] + nums[k] == 0`. + +Notice that the solution set must not contain duplicate triplets. + +**Example 1:** + +**Input:** nums = [-1,0,1,2,-1,-4] + +**Output:** [[-1,-1,2],[-1,0,1]] + +**Example 2:** + +**Input:** nums = [] + +**Output:** [] + +**Example 3:** + +**Input:** nums = [0] + +**Output:** [] + +**Constraints:** + +* `0 <= nums.length <= 3000` +* -105 <= nums[i] <= 105 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/Solution.rs b/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/Solution.rs new file mode 100644 index 0000000..9354825 --- /dev/null +++ b/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/Solution.rs @@ -0,0 +1,42 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Backtracking +// #Algorithm_II_Day_11_Recursion_Backtracking #Udemy_Backtracking/Recursion +// #Big_O_Time_O(4^n)_Space_O(n) #2024_09_04_Time_0_ms_(100.00%)_Space_2.2_MB_(45.71%) + +impl Solution { + pub fn letter_combinations(digits: String) -> Vec { + if digits.is_empty() { + return vec![]; + } + + let letters = vec![ + "", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" + ]; + + let mut ans = vec![]; + let mut sb = String::new(); + Solution::find_combinations(0, &digits, &letters, &mut sb, &mut ans); + ans + } + + fn find_combinations( + start: usize, + digits: &str, + letters: &[&str], + curr: &mut String, + ans: &mut Vec, + ) { + if curr.len() == digits.len() { + ans.push(curr.clone()); + return; + } + + for i in start..digits.len() { + let n = digits.chars().nth(i).unwrap().to_digit(10).unwrap() as usize; + for ch in letters[n].chars() { + curr.push(ch); + Solution::find_combinations(i + 1, digits, letters, curr, ans); + curr.pop(); + } + } + } +} diff --git a/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md b/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md new file mode 100644 index 0000000..8ac5796 --- /dev/null +++ b/src/main/rust/g0001_0100/s0017_letter_combinations_of_a_phone_number/readme.md @@ -0,0 +1,32 @@ +17\. Letter Combinations of a Phone Number + +Medium + +Given a string containing digits from `2-9` inclusive, return all possible letter combinations that the number could represent. Return the answer in **any order**. + +A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Telephone-keypad2.svg/200px-Telephone-keypad2.svg.png) + +**Example 1:** + +**Input:** digits = "23" + +**Output:** ["ad","ae","af","bd","be","bf","cd","ce","cf"] + +**Example 2:** + +**Input:** digits = "" + +**Output:** [] + +**Example 3:** + +**Input:** digits = "2" + +**Output:** ["a","b","c"] + +**Constraints:** + +* `0 <= digits.length <= 4` +* `digits[i]` is a digit in the range `['2', '9']`. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/Solution.rs b/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/Solution.rs new file mode 100644 index 0000000..d1c16b8 --- /dev/null +++ b/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/Solution.rs @@ -0,0 +1,50 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Two_Pointers #Linked_List +// #Algorithm_I_Day_5_Two_Pointers #Level_2_Day_3_Linked_List #Big_O_Time_O(L)_Space_O(L) +// #2024_09_04_Time_0_ms_(100.00%)_Space_2.1_MB_(58.02%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn remove_nth_from_end(head: Option>, n: i32) -> Option> { + // Use a naive solution + // Get the length of the list + // Traverse again up to target - 1, remove target and point next to the next item + let mut length: i32 = 0; + let mut node: &Option> = &head; + while let Some(node_val) = node { + length += 1; + node = &node_val.next; + } + + // Create a new list to contain the result with node removed from it + let mut result = Some(Box::new(ListNode::new(0))); + let mut current = result.as_mut(); + let mut node = &head; + let mut x: i32 = 1; + + while let Some(node_val) = node { + if (length - x + 1) != n { + current.as_mut().unwrap().next = Some(Box::new(ListNode::new(node_val.val))); + current = current.unwrap().next.as_mut(); + } + x += 1; + node = &node_val.next; + } + + result.unwrap().next + } +} diff --git a/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md b/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md new file mode 100644 index 0000000..afd85ab --- /dev/null +++ b/src/main/rust/g0001_0100/s0019_remove_nth_node_from_end_of_list/readme.md @@ -0,0 +1,34 @@ +19\. Remove Nth Node From End of List + +Medium + +Given the `head` of a linked list, remove the `nth` node from the end of the list and return its head. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/03/remove_ex1.jpg) + +**Input:** head = [1,2,3,4,5], n = 2 + +**Output:** [1,2,3,5] + +**Example 2:** + +**Input:** head = [1], n = 1 + +**Output:** [] + +**Example 3:** + +**Input:** head = [1,2], n = 1 + +**Output:** [1] + +**Constraints:** + +* The number of nodes in the list is `sz`. +* `1 <= sz <= 30` +* `0 <= Node.val <= 100` +* `1 <= n <= sz` + +**Follow up:** Could you do this in one pass? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0020_valid_parentheses/Solution.rs b/src/main/rust/g0001_0100/s0020_valid_parentheses/Solution.rs new file mode 100644 index 0000000..895c873 --- /dev/null +++ b/src/main/rust/g0001_0100/s0020_valid_parentheses/Solution.rs @@ -0,0 +1,32 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #String #Stack +// #Data_Structure_I_Day_9_Stack_Queue #Udemy_Strings #Big_O_Time_O(n)_Space_O(n) +// #2024_09_04_Time_0_ms_(100.00%)_Space_2.2_MB_(50.76%) + +impl Solution { + pub fn is_valid(s: String) -> bool { + let mut stack = Vec::new(); + for c in s.chars() { + match c { + '(' | '[' | '{' => stack.push(c), + ')' => { + if stack.is_empty() || stack.pop() != Some('(') { + return false; + } + } + '}' => { + if stack.is_empty() || stack.pop() != Some('{') { + return false; + } + } + ']' => { + if stack.is_empty() || stack.pop() != Some('[') { + return false; + } + } + _ => return false, + } + } + + stack.is_empty() + } +} diff --git a/src/main/rust/g0001_0100/s0020_valid_parentheses/readme.md b/src/main/rust/g0001_0100/s0020_valid_parentheses/readme.md new file mode 100644 index 0000000..6232da2 --- /dev/null +++ b/src/main/rust/g0001_0100/s0020_valid_parentheses/readme.md @@ -0,0 +1,45 @@ +20\. Valid Parentheses + +Easy + +Given a string `s` containing just the characters `'('`, `')'`, `'{'`, `'}'`, `'['` and `']'`, determine if the input string is valid. + +An input string is valid if: + +1. Open brackets must be closed by the same type of brackets. +2. Open brackets must be closed in the correct order. + +**Example 1:** + +**Input:** s = "()" + +**Output:** true + +**Example 2:** + +**Input:** s = "()[]{}" + +**Output:** true + +**Example 3:** + +**Input:** s = "(]" + +**Output:** false + +**Example 4:** + +**Input:** s = "([)]" + +**Output:** false + +**Example 5:** + +**Input:** s = "{[]}" + +**Output:** true + +**Constraints:** + +* 1 <= s.length <= 104 +* `s` consists of parentheses only `'()[]{}'`. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/Solution.rs b/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/Solution.rs new file mode 100644 index 0000000..f167097 --- /dev/null +++ b/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/Solution.rs @@ -0,0 +1,49 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Linked_List #Recursion +// #Data_Structure_I_Day_7_Linked_List #Algorithm_I_Day_10_Recursion_Backtracking +// #Level_1_Day_3_Linked_List #Udemy_Linked_List #Big_O_Time_O(m+n)_Space_O(m+n) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.1_MB_(14.29%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn merge_two_lists( + mut l1: Option>, + mut l2: Option>, + ) -> Option> { + let mut dummy = Some(Box::new(ListNode::new(-1))); + let mut current = &mut dummy; + + while l1.is_some() || l2.is_some() { + if let (Some(ref l1_node), Some(ref l2_node)) = (&l1, &l2) { + if l1_node.val <= l2_node.val { + current.as_mut().unwrap().next = l1.take(); + l1 = current.as_mut().unwrap().next.as_mut().unwrap().next.take(); + } else { + current.as_mut().unwrap().next = l2.take(); + l2 = current.as_mut().unwrap().next.as_mut().unwrap().next.take(); + } + } else if l1.is_some() { + current.as_mut().unwrap().next = l1.take(); + } else { + current.as_mut().unwrap().next = l2.take(); + } + current = &mut current.as_mut().unwrap().next; + } + + dummy.unwrap().next + } +} diff --git a/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/readme.md b/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/readme.md new file mode 100644 index 0000000..dfa4653 --- /dev/null +++ b/src/main/rust/g0001_0100/s0021_merge_two_sorted_lists/readme.md @@ -0,0 +1,31 @@ +21\. Merge Two Sorted Lists + +Easy + +Merge two sorted linked lists and return it as a **sorted** list. The list should be made by splicing together the nodes of the first two lists. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/03/merge_ex1.jpg) + +**Input:** l1 = [1,2,4], l2 = [1,3,4] + +**Output:** [1,1,2,3,4,4] + +**Example 2:** + +**Input:** l1 = [], l2 = [] + +**Output:** [] + +**Example 3:** + +**Input:** l1 = [], l2 = [0] + +**Output:** [0] + +**Constraints:** + +* The number of nodes in both lists is in the range `[0, 50]`. +* `-100 <= Node.val <= 100` +* Both `l1` and `l2` are sorted in **non-decreasing** order. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0022_generate_parentheses/Solution.rs b/src/main/rust/g0001_0100/s0022_generate_parentheses/Solution.rs new file mode 100644 index 0000000..ea15c19 --- /dev/null +++ b/src/main/rust/g0001_0100/s0022_generate_parentheses/Solution.rs @@ -0,0 +1,31 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Dynamic_Programming +// #Backtracking #Algorithm_II_Day_11_Recursion_Backtracking #Udemy_Backtracking/Recursion +// #Big_O_Time_O(2^n)_Space_O(n) #2024_09_05_Time_1_ms_(83.92%)_Space_2.3_MB_(62.75%) + +impl Solution { + pub fn generate_parenthesis(n: i32) -> Vec { + let mut result = Vec::new(); + let mut current = String::new(); + Solution::generate(&mut current, &mut result, n, n); + result + } + + fn generate(current: &mut String, result: &mut Vec, open: i32, close: i32) { + if open == 0 && close == 0 { + result.push(current.clone()); + return; + } + + if open > 0 { + current.push('('); + Solution::generate(current, result, open - 1, close); + current.pop(); + } + + if close > 0 && open < close { + current.push(')'); + Solution::generate(current, result, open, close - 1); + current.pop(); + } + } +} diff --git a/src/main/rust/g0001_0100/s0022_generate_parentheses/readme.md b/src/main/rust/g0001_0100/s0022_generate_parentheses/readme.md new file mode 100644 index 0000000..287a44e --- /dev/null +++ b/src/main/rust/g0001_0100/s0022_generate_parentheses/readme.md @@ -0,0 +1,21 @@ +22\. Generate Parentheses + +Medium + +Given `n` pairs of parentheses, write a function to _generate all combinations of well-formed parentheses_. + +**Example 1:** + +**Input:** n = 3 + +**Output:** ["((()))","(()())","(())()","()(())","()()()"] + +**Example 2:** + +**Input:** n = 1 + +**Output:** ["()"] + +**Constraints:** + +* `1 <= n <= 8` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/Solution.rs b/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/Solution.rs new file mode 100644 index 0000000..c55f0f2 --- /dev/null +++ b/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/Solution.rs @@ -0,0 +1,70 @@ +// #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)) +// #2024_09_05_Time_0_ms_(100.00%)_Space_3.2_MB_(74.80%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +use std::cmp::Ordering; +use std::collections::BinaryHeap; +use std::cmp::Reverse; + +struct HeapNode(Box); + +impl PartialEq for HeapNode { + fn eq(&self, other: &Self) -> bool { + self.0.val == other.0.val + } +} + +impl Eq for HeapNode {} + +impl PartialOrd for HeapNode { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for HeapNode { + fn cmp(&self, other: &Self) -> Ordering { + other.0.val.cmp(&self.0.val) + } +} + +impl Solution { + pub fn merge_k_lists(lists: Vec>>) -> Option> { + let mut heap = BinaryHeap::new(); + + for list in lists { + if let Some(node) = list { + heap.push(HeapNode(node)); + } + } + + let mut dummy = Box::new(ListNode::new(0)); + let mut tail = &mut dummy; + + while let Some(HeapNode(mut node)) = heap.pop() { + if let Some(next) = node.next.take() { + heap.push(HeapNode(next)); + } + tail.next = Some(node); + tail = tail.next.as_mut().unwrap(); + } + + dummy.next + } +} diff --git a/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/readme.md b/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/readme.md new file mode 100644 index 0000000..db931cc --- /dev/null +++ b/src/main/rust/g0001_0100/s0023_merge_k_sorted_lists/readme.md @@ -0,0 +1,36 @@ +23\. Merge k Sorted Lists + +Hard + +You are given an array of `k` linked-lists `lists`, each linked-list is sorted in ascending order. + +_Merge all the linked-lists into one sorted linked-list and return it._ + +**Example 1:** + +**Input:** lists = [[1,4,5],[1,3,4],[2,6]] + +**Output:** [1,1,2,3,4,4,5,6] + +**Explanation:** The linked-lists are: [ 1->4->5, 1->3->4, 2->6 ] merging them into one sorted list: 1->1->2->3->4->4->5->6 + +**Example 2:** + +**Input:** lists = [] + +**Output:** [] + +**Example 3:** + +**Input:** lists = [[]] + +**Output:** [] + +**Constraints:** + +* `k == lists.length` +* `0 <= k <= 10^4` +* `0 <= lists[i].length <= 500` +* `-10^4 <= lists[i][j] <= 10^4` +* `lists[i]` is sorted in **ascending order**. +* The sum of `lists[i].length` won't exceed `10^4`. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/Solution.rs b/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/Solution.rs new file mode 100644 index 0000000..f89e56a --- /dev/null +++ b/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/Solution.rs @@ -0,0 +1,43 @@ +// #Medium #Top_100_Liked_Questions #Linked_List #Recursion #Data_Structure_II_Day_12_Linked_List +// #Udemy_Linked_List #Big_O_Time_O(n)_Space_O(1) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.1_MB_(69.74%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn swap_pairs(mut head: Option>) -> Option> { + let mut dummy = ListNode { + val: 0, + next: head, + }; + let mut current = &mut dummy; + + while let Some(mut first) = current.next.take() { + if let Some(mut second) = first.next.take() { + first.next = second.next.take(); + second.next = Some(first); + current.next = Some(second); + current = current.next.as_mut().unwrap().next.as_mut().unwrap(); + } else { + current.next = Some(first); + break; + } + } + + dummy.next + } +} diff --git a/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/readme.md b/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/readme.md new file mode 100644 index 0000000..85922fc --- /dev/null +++ b/src/main/rust/g0001_0100/s0024_swap_nodes_in_pairs/readme.md @@ -0,0 +1,30 @@ +24\. Swap Nodes in Pairs + +Medium + +Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only nodes themselves may be changed.) + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/03/swap_ex1.jpg) + +**Input:** head = [1,2,3,4] + +**Output:** [2,1,4,3] + +**Example 2:** + +**Input:** head = [] + +**Output:** [] + +**Example 3:** + +**Input:** head = [1] + +**Output:** [1] + +**Constraints:** + +* The number of nodes in the list is in the range `[0, 100]`. +* `0 <= Node.val <= 100` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/Solution.rs b/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/Solution.rs new file mode 100644 index 0000000..64e30b5 --- /dev/null +++ b/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/Solution.rs @@ -0,0 +1,61 @@ +// #Hard #Top_100_Liked_Questions #Linked_List #Recursion #Data_Structure_II_Day_13_Linked_List +// #Udemy_Linked_List #Big_O_Time_O(n)_Space_O(k) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.3_MB_(100.00%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn reverse_k_group(mut head: Option>, k: i32) -> Option> { + Solution::reverse(head, k) + } + pub fn reverse(mut head:Option>, k: i32) -> Option> { + if head.is_none() { + return None; + } + let mut new_head: Option> = None; + let mut i = 0; + while let Some(mut head_val) = head.take() { + head = head_val.next.take(); + head_val.next = new_head; + new_head = Some(head_val); + i += 1; + if i == k { + break; + } + } + if i != k { + // have to back out and return original list + return Solution::reverse(new_head, i); + } + // we now have two lists: + // head -> rest of list + // new_head -> reversed list + // i cannot figure out how in rust you do this in one pass, + // so we will go walk the list again to get the tail of new_head and make it head + // 'append' + head = Solution::reverse(head, k); + let mut tailw = &mut new_head; + if let Some(ref mut tail_val) = tailw { + let mut tail = tail_val; + while let Some(ref mut tail_next) = tail.next { + tail = tail_next; + } + tail.next = head; + } + new_head + } +} diff --git a/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md b/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md new file mode 100644 index 0000000..6a98d1e --- /dev/null +++ b/src/main/rust/g0001_0100/s0025_reverse_nodes_in_k_group/readme.md @@ -0,0 +1,46 @@ +25\. Reverse Nodes in k-Group + +Hard + +Given a linked list, reverse the nodes of a linked list _k_ at a time and return its modified list. + +_k_ is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of _k_ then left-out nodes, in the end, should remain as it is. + +You may not alter the values in the list's nodes, only nodes themselves may be changed. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/03/reverse_ex1.jpg) + +**Input:** head = [1,2,3,4,5], k = 2 + +**Output:** [2,1,4,3,5] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/10/03/reverse_ex2.jpg) + +**Input:** head = [1,2,3,4,5], k = 3 + +**Output:** [3,2,1,4,5] + +**Example 3:** + +**Input:** head = [1,2,3,4,5], k = 1 + +**Output:** [1,2,3,4,5] + +**Example 4:** + +**Input:** head = [1], k = 1 + +**Output:** [1] + +**Constraints:** + +* The number of nodes in the list is in the range `sz`. +* `1 <= sz <= 5000` +* `0 <= Node.val <= 1000` +* `1 <= k <= sz` + +**Follow-up:** Can you solve the problem in O(1) extra memory space? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0031_next_permutation/Solution.rs b/src/main/rust/g0001_0100/s0031_next_permutation/Solution.rs new file mode 100644 index 0000000..b7f0782 --- /dev/null +++ b/src/main/rust/g0001_0100/s0031_next_permutation/Solution.rs @@ -0,0 +1,44 @@ +// #Medium #Top_100_Liked_Questions #Array #Two_Pointers #Big_O_Time_O(n)_Space_O(1) +// #2024_09_05_Time_1_ms_(78.64%)_Space_2.2_MB_(31.07%) + +impl Solution { + pub fn next_permutation(nums: &mut Vec) { + if nums.len() <= 1 { + return; + } + + // Step 1: Find the first decreasing element from the end + let mut i = nums.len() as i32 - 2; + while i >= 0 && nums[i as usize] >= nums[(i + 1) as usize] { + i -= 1; + } + + // Step 2: If the entire sequence isn't decreasing, swap the element + if i >= 0 { + let mut j = nums.len() as i32 - 1; + while nums[j as usize] <= nums[i as usize] { + j -= 1; + } + Solution::swap(nums, i as usize, j as usize); + } + + // Step 3: Reverse the elements after the found element + Solution::reverse(nums, (i + 1) as usize, nums.len() - 1); + } + + // Swap elements at index i and j + fn swap(nums: &mut Vec, i: usize, j: usize) { + let temp = nums[i]; + nums[i] = nums[j]; + nums[j] = temp; + } + + // Reverse the elements in the slice from index i to j + fn reverse(nums: &mut Vec, mut i: usize, mut j: usize) { + while i < j { + Solution::swap(nums, i, j); + i += 1; + j -= 1; + } + } +} diff --git a/src/main/rust/g0001_0100/s0031_next_permutation/readme.md b/src/main/rust/g0001_0100/s0031_next_permutation/readme.md new file mode 100644 index 0000000..a3c4094 --- /dev/null +++ b/src/main/rust/g0001_0100/s0031_next_permutation/readme.md @@ -0,0 +1,40 @@ +31\. Next Permutation + +Medium + +A **permutation** of an array of integers is an arrangement of its members into a sequence or linear order. + +* For example, for `arr = [1,2,3]`, the following are all the permutations of `arr`: `[1,2,3], [1,3,2], [2, 1, 3], [2, 3, 1], [3,1,2], [3,2,1]`. + +The **next permutation** of an array of integers is the next lexicographically greater permutation of its integer. More formally, if all the permutations of the array are sorted in one container according to their lexicographical order, then the **next permutation** of that array is the permutation that follows it in the sorted container. If such arrangement is not possible, the array must be rearranged as the lowest possible order (i.e., sorted in ascending order). + +* For example, the next permutation of `arr = [1,2,3]` is `[1,3,2]`. +* Similarly, the next permutation of `arr = [2,3,1]` is `[3,1,2]`. +* While the next permutation of `arr = [3,2,1]` is `[1,2,3]` because `[3,2,1]` does not have a lexicographical larger rearrangement. + +Given an array of integers `nums`, _find the next permutation of_ `nums`. + +The replacement must be **[in place](http://en.wikipedia.org/wiki/In-place_algorithm)** and use only constant extra memory. + +**Example 1:** + +**Input:** nums = [1,2,3] + +**Output:** [1,3,2] + +**Example 2:** + +**Input:** nums = [3,2,1] + +**Output:** [1,2,3] + +**Example 3:** + +**Input:** nums = [1,1,5] + +**Output:** [1,5,1] + +**Constraints:** + +* `1 <= nums.length <= 100` +* `0 <= nums[i] <= 100` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/Solution.rs b/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/Solution.rs new file mode 100644 index 0000000..735c5bf --- /dev/null +++ b/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/Solution.rs @@ -0,0 +1,52 @@ +// #Hard #Top_100_Liked_Questions #String #Dynamic_Programming #Stack #Big_O_Time_O(n)_Space_O(1) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.3_MB_(61.46%) + +impl Solution { + pub fn longest_valid_parentheses(s: String) -> i32 { + let mut max_len = 0; + let mut left = 0; + let mut right = 0; + let n = s.len(); + let chars: Vec = s.chars().collect(); + + // Left to right pass + for i in 0..n { + if chars[i] == '(' { + left += 1; + } else { + right += 1; + } + + if right > left { + left = 0; + right = 0; + } + + if left == right { + max_len = max_len.max(left + right); + } + } + + // Right to left pass + left = 0; + right = 0; + for i in (0..n).rev() { + if chars[i] == '(' { + left += 1; + } else { + right += 1; + } + + if left > right { + left = 0; + right = 0; + } + + if left == right { + max_len = max_len.max(left + right); + } + } + + max_len as i32 + } +} diff --git a/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/readme.md b/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/readme.md new file mode 100644 index 0000000..dfddb13 --- /dev/null +++ b/src/main/rust/g0001_0100/s0032_longest_valid_parentheses/readme.md @@ -0,0 +1,32 @@ +32\. Longest Valid Parentheses + +Hard + +Given a string containing just the characters `'('` and `')'`, find the length of the longest valid (well-formed) parentheses substring. + +**Example 1:** + +**Input:** s = "(()" + +**Output:** 2 + +**Explanation:** The longest valid parentheses substring is "()". + +**Example 2:** + +**Input:** s = ")()())" + +**Output:** 4 + +**Explanation:** The longest valid parentheses substring is "()()". + +**Example 3:** + +**Input:** s = "" + +**Output:** 0 + +**Constraints:** + +* 0 <= s.length <= 3 * 104 +* `s[i]` is `'('`, or `')'`. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/Solution.rs b/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/Solution.rs new file mode 100644 index 0000000..cbe7671 --- /dev/null +++ b/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/Solution.rs @@ -0,0 +1,38 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Binary_Search +// #Algorithm_II_Day_1_Binary_Search #Binary_Search_I_Day_11 #Level_2_Day_8_Binary_Search +// #Udemy_Binary_Search #Big_O_Time_O(log_n)_Space_O(1) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.1_MB_(99.00%) + +impl Solution { + pub fn search(nums: Vec, target: i32) -> i32 { + let mut lo = 0; + let mut hi = nums.len() as i32 - 1; + + while lo <= hi { + let mid = lo + ((hi - lo) >> 1); // Calculate mid index + + if nums[mid as usize] == target { + return mid; // Target found, return the index + } + + // If the left half is sorted + if nums[lo as usize] <= nums[mid as usize] { + // Check if the target lies within the sorted left half + if nums[lo as usize] <= target && target <= nums[mid as usize] { + hi = mid - 1; // Target is in the left half + } else { + lo = mid + 1; // Move to the right half + } + } else { + // If the right half is sorted + if nums[mid as usize] <= target && target <= nums[hi as usize] { + lo = mid + 1; // Target is in the right half + } else { + hi = mid - 1; // Move to the left half + } + } + } + + -1 // Target not found + } +} diff --git a/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/readme.md b/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/readme.md new file mode 100644 index 0000000..62aa8ba --- /dev/null +++ b/src/main/rust/g0001_0100/s0033_search_in_rotated_sorted_array/readme.md @@ -0,0 +1,37 @@ +33\. Search in Rotated Sorted Array + +Medium + +There is an integer array `nums` sorted in ascending order (with **distinct** values). + +Prior to being passed to your function, `nums` is **possibly rotated** at an unknown pivot index `k` (`1 <= k < nums.length`) such that the resulting array is `[nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]]` (**0-indexed**). For example, `[0,1,2,4,5,6,7]` might be rotated at pivot index `3` and become `[4,5,6,7,0,1,2]`. + +Given the array `nums` **after** the possible rotation and an integer `target`, return _the index of_ `target` _if it is in_ `nums`_, or_ `-1` _if it is not in_ `nums`. + +You must write an algorithm with `O(log n)` runtime complexity. + +**Example 1:** + +**Input:** nums = [4,5,6,7,0,1,2], target = 0 + +**Output:** 4 + +**Example 2:** + +**Input:** nums = [4,5,6,7,0,1,2], target = 3 + +**Output:** -1 + +**Example 3:** + +**Input:** nums = [1], target = 0 + +**Output:** -1 + +**Constraints:** + +* `1 <= nums.length <= 5000` +* -104 <= nums[i] <= 104 +* All values of `nums` are **unique**. +* `nums` is an ascending array that is possibly rotated. +* -104 <= target <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/Solution.rs b/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/Solution.rs new file mode 100644 index 0000000..88eb438 --- /dev/null +++ b/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/Solution.rs @@ -0,0 +1,29 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Binary_Search +// #Algorithm_II_Day_1_Binary_Search #Binary_Search_I_Day_5 #Big_O_Time_O(log_n)_Space_O(1) +// #2024_09_05_Time_0_ms_(100.00%)_Space_2.4_MB_(11.36%) + +impl Solution { + pub fn search_range(nums: Vec, target: i32) -> Vec { + let mut ans = vec![-1, -1]; + ans[0] = Solution::helper(&nums, target, false); + ans[1] = Solution::helper(&nums, target, true); + ans + } + + fn helper(nums: &[i32], target: i32, equals: bool) -> i32 { + let (mut l, mut r) = (0, nums.len() as i32 - 1); + let mut result = -1; + while l <= r { + let mid = l + (r - l) / 2; + if nums[mid as usize] == target { + result = mid; + } + if nums[mid as usize] < target || (nums[mid as usize] == target && equals) { + l = mid + 1; + } else { + r = mid - 1; + } + } + result + } +} diff --git a/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/readme.md b/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/readme.md new file mode 100644 index 0000000..3ccb152 --- /dev/null +++ b/src/main/rust/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/readme.md @@ -0,0 +1,34 @@ +34\. Find First and Last Position of Element in Sorted Array + +Medium + +Given an array of integers `nums` sorted in non-decreasing order, find the starting and ending position of a given `target` value. + +If `target` is not found in the array, return `[-1, -1]`. + +You must write an algorithm with `O(log n)` runtime complexity. + +**Example 1:** + +**Input:** nums = [5,7,7,8,8,10], target = 8 + +**Output:** [3,4] + +**Example 2:** + +**Input:** nums = [5,7,7,8,8,10], target = 6 + +**Output:** [-1,-1] + +**Example 3:** + +**Input:** nums = [], target = 0 + +**Output:** [-1,-1] + +**Constraints:** + +* 0 <= nums.length <= 105 +* -109 <= nums[i] <= 109 +* `nums` is a non-decreasing array. +* -109 <= target <= 109 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0035_search_insert_position/Solution.rs b/src/main/rust/g0001_0100/s0035_search_insert_position/Solution.rs new file mode 100644 index 0000000..9ebb968 --- /dev/null +++ b/src/main/rust/g0001_0100/s0035_search_insert_position/Solution.rs @@ -0,0 +1,20 @@ +// #Easy #Top_100_Liked_Questions #Array #Binary_Search #Algorithm_I_Day_1_Binary_Search +// #Binary_Search_I_Day_2 #Big_O_Time_O(log_n)_Space_O(1) +// #2024_09_05_Time_1_ms_(83.61%)_Space_2.1_MB_(70.02%) + +impl Solution { + pub fn search_insert(nums: Vec, target: i32) -> i32 { + let (mut lo, mut hi) = (0, nums.len() as i32 - 1); + while lo <= hi { + let mid = lo + (hi - lo) / 2; + if target == nums[mid as usize] { + return mid; + } else if target < nums[mid as usize] { + hi = mid - 1; + } else { + lo = mid + 1; + } + } + lo + } +} diff --git a/src/main/rust/g0001_0100/s0035_search_insert_position/readme.md b/src/main/rust/g0001_0100/s0035_search_insert_position/readme.md new file mode 100644 index 0000000..c273f32 --- /dev/null +++ b/src/main/rust/g0001_0100/s0035_search_insert_position/readme.md @@ -0,0 +1,44 @@ +35\. Search Insert Position + +Easy + +Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. + +You must write an algorithm with `O(log n)` runtime complexity. + +**Example 1:** + +**Input:** nums = [1,3,5,6], target = 5 + +**Output:** 2 + +**Example 2:** + +**Input:** nums = [1,3,5,6], target = 2 + +**Output:** 1 + +**Example 3:** + +**Input:** nums = [1,3,5,6], target = 7 + +**Output:** 4 + +**Example 4:** + +**Input:** nums = [1,3,5,6], target = 0 + +**Output:** 0 + +**Example 5:** + +**Input:** nums = [1], target = 0 + +**Output:** 0 + +**Constraints:** + +* 1 <= nums.length <= 104 +* -104 <= nums[i] <= 104 +* `nums` contains **distinct** values sorted in **ascending** order. +* -104 <= target <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0039_combination_sum/Solution.rs b/src/main/rust/g0001_0100/s0039_combination_sum/Solution.rs new file mode 100644 index 0000000..9d6c05f --- /dev/null +++ b/src/main/rust/g0001_0100/s0039_combination_sum/Solution.rs @@ -0,0 +1,35 @@ +// #Medium #Top_100_Liked_Questions #Array #Backtracking #Algorithm_II_Day_10_Recursion_Backtracking +// #Level_2_Day_20_Brute_Force/Backtracking #Udemy_Backtracking/Recursion +// #Big_O_Time_O(2^n)_Space_O(n+2^n) #2024_09_06_Time_1_ms_(86.63%)_Space_2.2_MB_(19.77%) + +impl Solution { + pub fn combination_sum(coins: Vec, amount: i32) -> Vec> { + let mut ans = Vec::new(); + let mut sub_list = Vec::new(); + Solution::combination_sum_rec(coins.len() as i32, &coins, amount, &mut sub_list, &mut ans); + ans + } + + fn combination_sum_rec( + n: i32, + coins: &[i32], + amount: i32, + sub_list: &mut Vec, + ans: &mut Vec>, + ) { + if amount == 0 || n == 0 { + if amount == 0 { + ans.push(sub_list.clone()); + } + return; + } + + if amount - coins[n as usize - 1] >= 0 { + sub_list.push(coins[n as usize - 1]); + Solution::combination_sum_rec(n, coins, amount - coins[n as usize - 1], sub_list, ans); + sub_list.pop(); + } + + Solution::combination_sum_rec(n - 1, coins, amount, sub_list, ans); + } +} diff --git a/src/main/rust/g0001_0100/s0039_combination_sum/readme.md b/src/main/rust/g0001_0100/s0039_combination_sum/readme.md new file mode 100644 index 0000000..3c1934f --- /dev/null +++ b/src/main/rust/g0001_0100/s0039_combination_sum/readme.md @@ -0,0 +1,41 @@ +39\. Combination Sum + +Medium + +Given an array of **distinct** integers `candidates` and a target integer `target`, return _a list of all **unique combinations** of_ `candidates` _where the chosen numbers sum to_ `target`_._ You may return the combinations in **any order**. + +The **same** number may be chosen from `candidates` an **unlimited number of times**. Two combinations are unique if the frequency of at least one of the chosen numbers is different. + +It is **guaranteed** that the number of unique combinations that sum up to `target` is less than `150` combinations for the given input. + +**Example 1:** + +**Input:** candidates = [2,3,6,7], target = 7 + +**Output:** [[2,2,3],[7]] + +**Explanation:** +2 and 3 are candidates, and 2 + 2 + 3 = 7. Note that 2 can be used multiple times. + +7 is a candidate, and 7 = 7. + +These are the only two combinations. + +**Example 2:** + +**Input:** candidates = [2,3,5], target = 8 + +**Output:** [[2,2,2,2],[2,3,3],[3,5]] + +**Example 3:** + +**Input:** candidates = [2], target = 1 + +**Output:** [] + +**Constraints:** + +* `1 <= candidates.length <= 30` +* `1 <= candidates[i] <= 200` +* All elements of `candidates` are **distinct**. +* `1 <= target <= 500` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0041_first_missing_positive/Solution.rs b/src/main/rust/g0001_0100/s0041_first_missing_positive/Solution.rs new file mode 100644 index 0000000..60ec43b --- /dev/null +++ b/src/main/rust/g0001_0100/s0041_first_missing_positive/Solution.rs @@ -0,0 +1,20 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Udemy_Arrays +// #Big_O_Time_O(n)_Space_O(n) #2024_09_06_Time_3_ms_(97.44%)_Space_2.9_MB_(100.00%) + +impl Solution { + pub fn first_missing_positive(nums: Vec) -> i32 { + let mut max = nums.len()+1; + let mut vec:Vec = vec![0;max+2]; + for n in nums { + if n <= 0 { + max -= 1; + } else if n <= (max as i32) { + vec[n as usize] += 1; + } + } + for i in 1..(max+1) { + if vec[i] == 0 { return i as i32; } + } + return 1; + } +} diff --git a/src/main/rust/g0001_0100/s0041_first_missing_positive/readme.md b/src/main/rust/g0001_0100/s0041_first_missing_positive/readme.md new file mode 100644 index 0000000..040b8c5 --- /dev/null +++ b/src/main/rust/g0001_0100/s0041_first_missing_positive/readme.md @@ -0,0 +1,36 @@ +41\. First Missing Positive + +Hard + +Given an unsorted integer array `nums`, return the smallest missing positive integer. + +You must implement an algorithm that runs in `O(n)` time and uses constant extra space. + +**Example 1:** + +**Input:** nums = [1,2,0] + +**Output:** 3 + +**Explanation:** The numbers in the range [1,2] are all in the array. + +**Example 2:** + +**Input:** nums = [3,4,-1,1] + +**Output:** 2 + +**Explanation:** 1 is in the array but 2 is missing. + +**Example 3:** + +**Input:** nums = [7,8,9,11,12] + +**Output:** 1 + +**Explanation:** The smallest positive integer 1 is missing. + +**Constraints:** + +* 1 <= nums.length <= 105 +* -231 <= nums[i] <= 231 - 1 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0042_trapping_rain_water/Solution.rs b/src/main/rust/g0001_0100/s0042_trapping_rain_water/Solution.rs new file mode 100644 index 0000000..6023686 --- /dev/null +++ b/src/main/rust/g0001_0100/s0042_trapping_rain_water/Solution.rs @@ -0,0 +1,28 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming #Two_Pointers +// #Stack #Monotonic_Stack #Dynamic_Programming_I_Day_9 #Udemy_Two_Pointers +// #Big_O_Time_O(n)_Space_O(1) #2024_09_06_Time_0_ms_(100.00%)_Space_2.2_MB_(67.75%) + +impl Solution { + pub fn trap(height: Vec) -> i32 { + let (mut l, mut r) = (0, height.len() as i32 - 1); + let mut res = 0; + let mut lower_wall = 0; + + while l < r { + let l_val = height[l as usize]; + let r_val = height[r as usize]; + + if l_val < r_val { + lower_wall = lower_wall.max(l_val); + res += lower_wall - l_val; + l += 1; + } else { + lower_wall = lower_wall.max(r_val); + res += lower_wall - r_val; + r -= 1; + } + } + + res + } +} diff --git a/src/main/rust/g0001_0100/s0042_trapping_rain_water/readme.md b/src/main/rust/g0001_0100/s0042_trapping_rain_water/readme.md new file mode 100644 index 0000000..3b62865 --- /dev/null +++ b/src/main/rust/g0001_0100/s0042_trapping_rain_water/readme.md @@ -0,0 +1,27 @@ +42\. Trapping Rain Water + +Hard + +Given `n` non-negative integers representing an elevation map where the width of each bar is `1`, compute how much water it can trap after raining. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png) + +**Input:** height = [0,1,0,2,1,0,1,3,2,1,2,1] + +**Output:** 6 + +**Explanation:** The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. + +**Example 2:** + +**Input:** height = [4,2,0,3,2,5] + +**Output:** 9 + +**Constraints:** + +* `n == height.length` +* 1 <= n <= 2 * 104 +* 0 <= height[i] <= 105 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0045_jump_game_ii/Solution.rs b/src/main/rust/g0001_0100/s0045_jump_game_ii/Solution.rs new file mode 100644 index 0000000..491471a --- /dev/null +++ b/src/main/rust/g0001_0100/s0045_jump_game_ii/Solution.rs @@ -0,0 +1,28 @@ +// #Medium #Top_100_Liked_Questions #Array #Dynamic_Programming #Greedy +// #Algorithm_II_Day_13_Dynamic_Programming #Dynamic_Programming_I_Day_4 +// #Big_O_Time_O(n)_Space_O(1) #2024_09_06_Time_0_ms_(100.00%)_Space_2.1_MB_(95.65%) + +impl Solution { + pub fn jump(nums: Vec) -> i32 { + let mut length = 0; + let mut max_length = 0; + let mut min_jump = 0; + + for i in 0..(nums.len() - 1) { + length -= 1; + max_length -= 1; + max_length = max_length.max(nums[i]); + + if length <= 0 { + length = max_length; + min_jump += 1; + } + + if length >= (nums.len() - i - 1) as i32 { + return min_jump; + } + } + + min_jump + } +} diff --git a/src/main/rust/g0001_0100/s0045_jump_game_ii/readme.md b/src/main/rust/g0001_0100/s0045_jump_game_ii/readme.md new file mode 100644 index 0000000..e5a76a7 --- /dev/null +++ b/src/main/rust/g0001_0100/s0045_jump_game_ii/readme.md @@ -0,0 +1,30 @@ +45\. Jump Game II + +Medium + +Given an array of non-negative integers `nums`, you are initially positioned at the first index of the array. + +Each element in the array represents your maximum jump length at that position. + +Your goal is to reach the last index in the minimum number of jumps. + +You can assume that you can always reach the last index. + +**Example 1:** + +**Input:** nums = [2,3,1,1,4] + +**Output:** 2 + +**Explanation:** The minimum number of jumps to reach the last index is 2. Jump 1 step from index 0 to 1, then 3 steps to the last index. + +**Example 2:** + +**Input:** nums = [2,3,0,1,4] + +**Output:** 2 + +**Constraints:** + +* 1 <= nums.length <= 104 +* `0 <= nums[i] <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0046_permutations/Solution.rs b/src/main/rust/g0001_0100/s0046_permutations/Solution.rs new file mode 100644 index 0000000..3cff6a2 --- /dev/null +++ b/src/main/rust/g0001_0100/s0046_permutations/Solution.rs @@ -0,0 +1,45 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Backtracking +// #Algorithm_I_Day_11_Recursion_Backtracking #Level_2_Day_20_Brute_Force/Backtracking +// #Udemy_Backtracking/Recursion #Big_O_Time_O(n*n!)_Space_O(n+n!) +// #2024_09_06_Time_1_ms_(83.08%)_Space_2.1_MB_(76.15%) + +impl Solution { + pub fn permute(nums: Vec) -> Vec> { + if nums.is_empty() { + return vec![]; + } + + let mut final_result = Vec::new(); + let mut curr_result = Vec::new(); + let mut used = vec![false; nums.len()]; + + Solution::permute_recur(&nums, &mut final_result, &mut curr_result, &mut used); + final_result + } + + fn permute_recur( + nums: &[i32], + final_result: &mut Vec>, + curr_result: &mut Vec, + used: &mut Vec, + ) { + if curr_result.len() == nums.len() { + final_result.push(curr_result.clone()); + return; + } + + for i in 0..nums.len() { + if used[i] { + continue; + } + + curr_result.push(nums[i]); + used[i] = true; + + Solution::permute_recur(nums, final_result, curr_result, used); + + used[i] = false; + curr_result.pop(); + } + } +} diff --git a/src/main/rust/g0001_0100/s0046_permutations/readme.md b/src/main/rust/g0001_0100/s0046_permutations/readme.md new file mode 100644 index 0000000..fdeabb6 --- /dev/null +++ b/src/main/rust/g0001_0100/s0046_permutations/readme.md @@ -0,0 +1,29 @@ +46\. Permutations + +Medium + +Given an array `nums` of distinct integers, return _all the possible permutations_. You can return the answer in **any order**. + +**Example 1:** + +**Input:** nums = [1,2,3] + +**Output:** [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] + +**Example 2:** + +**Input:** nums = [0,1] + +**Output:** [[0,1],[1,0]] + +**Example 3:** + +**Input:** nums = [1] + +**Output:** [[1]] + +**Constraints:** + +* `1 <= nums.length <= 6` +* `-10 <= nums[i] <= 10` +* All the integers of `nums` are **unique**. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0048_rotate_image/Solution.rs b/src/main/rust/g0001_0100/s0048_rotate_image/Solution.rs new file mode 100644 index 0000000..fca85ad --- /dev/null +++ b/src/main/rust/g0001_0100/s0048_rotate_image/Solution.rs @@ -0,0 +1,27 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Math #Matrix +// #Data_Structure_II_Day_3_Array #Programming_Skills_II_Day_7 #Udemy_2D_Arrays/Matrix +// #Big_O_Time_O(n^2)_Space_O(1) #2024_09_06_Time_0_ms_(100.00%)_Space_2.2_MB_(50.90%) + +impl Solution { + pub fn rotate(matrix: &mut Vec>) { + let n = matrix.len(); + for i in 0..n / 2 { + for j in i..n - i - 1 { + let pos = [ + (i, j), + (j, n - 1 - i), + (n - 1 - i, n - 1 - j), + (n - 1 - j, i), + ]; + + let mut t = matrix[pos[0].0][pos[0].1]; + for k in 1..pos.len() { + let temp = matrix[pos[k].0][pos[k].1]; + matrix[pos[k].0][pos[k].1] = t; + t = temp; + } + matrix[pos[0].0][pos[0].1] = t; + } + } + } +} diff --git a/src/main/rust/g0001_0100/s0048_rotate_image/readme.md b/src/main/rust/g0001_0100/s0048_rotate_image/readme.md new file mode 100644 index 0000000..6783505 --- /dev/null +++ b/src/main/rust/g0001_0100/s0048_rotate_image/readme.md @@ -0,0 +1,29 @@ +48\. Rotate Image + +Medium + +You are given an `n x n` 2D `matrix` representing an image, rotate the image by **90** degrees (clockwise). + +You have to rotate the image [**in-place**](https://en.wikipedia.org/wiki/In-place_algorithm), which means you have to modify the input 2D matrix directly. **DO NOT** allocate another 2D matrix and do the rotation. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/08/28/mat1.jpg) + +**Input:** matrix = [[1,2,3],[4,5,6],[7,8,9]] + +**Output:** [[7,4,1],[8,5,2],[9,6,3]] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/08/28/mat2.jpg) + +**Input:** matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]] + +**Output:** [[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]] + +**Constraints:** + +* `n == matrix.length == matrix[i].length` +* `1 <= n <= 20` +* `-1000 <= matrix[i][j] <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0049_group_anagrams/Solution.rs b/src/main/rust/g0001_0100/s0049_group_anagrams/Solution.rs new file mode 100644 index 0000000..e833e0b --- /dev/null +++ b/src/main/rust/g0001_0100/s0049_group_anagrams/Solution.rs @@ -0,0 +1,21 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #String #Hash_Table #Sorting +// #Data_Structure_II_Day_8_String #Programming_Skills_II_Day_11 #Udemy_Strings +// #Big_O_Time_O(n*k_log_k)_Space_O(n) #2024_09_06_Time_0_ms_(100.00%)_Space_5.3_MB_(26.81%) + +use std::collections::HashMap; + +impl Solution { + pub fn group_anagrams(strs: Vec) -> Vec> { + let mut hm: HashMap> = HashMap::new(); + + for s in strs.iter() { + let mut ch: Vec = s.chars().collect(); + ch.sort_unstable(); + let temp: String = ch.iter().collect(); + + hm.entry(temp).or_insert_with(Vec::new).push(s.clone()); + } + + hm.into_values().collect() + } +} diff --git a/src/main/rust/g0001_0100/s0049_group_anagrams/readme.md b/src/main/rust/g0001_0100/s0049_group_anagrams/readme.md new file mode 100644 index 0000000..31b44f2 --- /dev/null +++ b/src/main/rust/g0001_0100/s0049_group_anagrams/readme.md @@ -0,0 +1,31 @@ +49\. Group Anagrams + +Medium + +Given an array of strings `strs`, group **the anagrams** together. You can return the answer in **any order**. + +An **Anagram** is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. + +**Example 1:** + +**Input:** strs = ["eat","tea","tan","ate","nat","bat"] + +**Output:** [["bat"],["nat","tan"],["ate","eat","tea"]] + +**Example 2:** + +**Input:** strs = [""] + +**Output:** [[""]] + +**Example 3:** + +**Input:** strs = ["a"] + +**Output:** [["a"]] + +**Constraints:** + +* 1 <= strs.length <= 104 +* `0 <= strs[i].length <= 100` +* `strs[i]` consists of lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0051_n_queens/Solution.rs b/src/main/rust/g0001_0100/s0051_n_queens/Solution.rs new file mode 100644 index 0000000..164b41f --- /dev/null +++ b/src/main/rust/g0001_0100/s0051_n_queens/Solution.rs @@ -0,0 +1,53 @@ +// #Hard #Top_100_Liked_Questions #Array #Backtracking #Big_O_Time_O(N!)_Space_O(N) +// #2024_09_06_Time_1_ms_(90.82%)_Space_2.4_MB_(33.67%) + +impl Solution { + pub fn solve_n_queens(n: i32) -> Vec> { + let mut pos = vec![false; n as usize + 2 * n as usize - 1 + 2 * n as usize - 1]; + let mut pos2 = vec![0; n as usize]; + let mut ans = Vec::new(); + Solution::helper(n as usize, 0, &mut pos, &mut pos2, &mut ans); + ans + } + + fn helper( + n: usize, + row: usize, + pos: &mut Vec, + pos2: &mut Vec, + ans: &mut Vec>, + ) { + if row == n { + Solution::construct(n, pos2, ans); + return; + } + + for i in 0..n { + let index = n + 2 * n - 1 + n - 1 + i - row; + if pos[i] || pos[n + i + row] || pos[index] { + continue; + } + + pos[i] = true; + pos[n + i + row] = true; + pos[index] = true; + pos2[row] = i; + + Solution::helper(n, row + 1, pos, pos2, ans); + + pos[i] = false; + pos[n + i + row] = false; + pos[index] = false; + } + } + + fn construct(n: usize, pos2: &Vec, ans: &mut Vec>) { + let mut sol = Vec::new(); + for r in 0..n { + let mut queen_row = vec!['.'; n]; + queen_row[pos2[r]] = 'Q'; + sol.push(queen_row.into_iter().collect()); + } + ans.push(sol); + } +} diff --git a/src/main/rust/g0001_0100/s0051_n_queens/readme.md b/src/main/rust/g0001_0100/s0051_n_queens/readme.md new file mode 100644 index 0000000..7e66a13 --- /dev/null +++ b/src/main/rust/g0001_0100/s0051_n_queens/readme.md @@ -0,0 +1,29 @@ +51\. N-Queens + +Hard + +The **n-queens** puzzle is the problem of placing `n` queens on an `n x n` chessboard such that no two queens attack each other. + +Given an integer `n`, return _all distinct solutions to the **n-queens puzzle**_. You may return the answer in **any order**. + +Each solution contains a distinct board configuration of the n-queens' placement, where `'Q'` and `'.'` both indicate a queen and an empty space, respectively. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/13/queens.jpg) + +**Input:** n = 4 + +**Output:** [[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]] + +**Explanation:** There exist two distinct solutions to the 4-queens puzzle as shown above + +**Example 2:** + +**Input:** n = 1 + +**Output:** [["Q"]] + +**Constraints:** + +* `1 <= n <= 9` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0053_maximum_subarray/Solution.rs b/src/main/rust/g0001_0100/s0053_maximum_subarray/Solution.rs new file mode 100644 index 0000000..1e158bc --- /dev/null +++ b/src/main/rust/g0001_0100/s0053_maximum_subarray/Solution.rs @@ -0,0 +1,21 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming +// #Divide_and_Conquer #Data_Structure_I_Day_1_Array #Dynamic_Programming_I_Day_5 +// #Udemy_Famous_Algorithm #Big_O_Time_O(n)_Space_O(1) +// #2024_09_06_Time_7_ms_(89.94%)_Space_3.3_MB_(6.92%) + +impl Solution { + pub fn max_sub_array(nums: Vec) -> i32 { + let mut maxi = i32::MIN; + let mut sum = 0; + for &num in nums.iter() { + // calculating sub-array sum + sum += num; + maxi = maxi.max(sum); + // if the sum is negative, reset it to 0 + if sum < 0 { + sum = 0; + } + } + maxi + } +} diff --git a/src/main/rust/g0001_0100/s0053_maximum_subarray/readme.md b/src/main/rust/g0001_0100/s0053_maximum_subarray/readme.md new file mode 100644 index 0000000..e21c7a5 --- /dev/null +++ b/src/main/rust/g0001_0100/s0053_maximum_subarray/readme.md @@ -0,0 +1,34 @@ +53\. Maximum Subarray + +Medium + +Given an integer array `nums`, find the contiguous subarray (containing at least one number) which has the largest sum and return _its sum_. + +A **subarray** is a **contiguous** part of an array. + +**Example 1:** + +**Input:** nums = [-2,1,-3,4,-1,2,1,-5,4] + +**Output:** 6 + +**Explanation:** [4,-1,2,1] has the largest sum = 6. + +**Example 2:** + +**Input:** nums = [1] + +**Output:** 1 + +**Example 3:** + +**Input:** nums = [5,4,-1,7,8] + +**Output:** 23 + +**Constraints:** + +* 1 <= nums.length <= 105 +* -104 <= nums[i] <= 104 + +**Follow up:** If you have figured out the `O(n)` solution, try coding another solution using the **divide and conquer** approach, which is more subtle. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0055_jump_game/Solution.rs b/src/main/rust/g0001_0100/s0055_jump_game/Solution.rs new file mode 100644 index 0000000..0abc574 --- /dev/null +++ b/src/main/rust/g0001_0100/s0055_jump_game/Solution.rs @@ -0,0 +1,25 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming #Greedy +// #Algorithm_II_Day_12_Dynamic_Programming #Dynamic_Programming_I_Day_4 #Udemy_Arrays +// #Big_O_Time_O(n)_Space_O(1) #2024_09_06_Time_0_ms_(100.00%)_Space_2.2_MB_(49.50%) + +impl Solution { + pub fn can_jump(nums: Vec) -> bool { + let sz = nums.len(); + let mut tmp = 1; + + for i in 0..sz { + tmp -= 1; + if tmp < 0 { + return false; + } + // Update `tmp` to be the maximum value between current `tmp` and `nums[i]`. + tmp = tmp.max(nums[i]); + + // Early exit: if `i + tmp` can reach or exceed the last index, return true. + if i + tmp as usize >= sz - 1 { + return true; + } + } + true + } +} diff --git a/src/main/rust/g0001_0100/s0055_jump_game/readme.md b/src/main/rust/g0001_0100/s0055_jump_game/readme.md new file mode 100644 index 0000000..8e3ca2d --- /dev/null +++ b/src/main/rust/g0001_0100/s0055_jump_game/readme.md @@ -0,0 +1,28 @@ +55\. Jump Game + +Medium + +You are given an integer array `nums`. You are initially positioned at the array's **first index**, and each element in the array represents your maximum jump length at that position. + +Return `true` _if you can reach the last index, or_ `false` _otherwise_. + +**Example 1:** + +**Input:** nums = [2,3,1,1,4] + +**Output:** true + +**Explanation:** Jump 1 step from index 0 to 1, then 3 steps to the last index. + +**Example 2:** + +**Input:** nums = [3,2,1,0,4] + +**Output:** false + +**Explanation:** You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index. + +**Constraints:** + +* 1 <= nums.length <= 104 +* 0 <= nums[i] <= 105 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0056_merge_intervals/Solution.rs b/src/main/rust/g0001_0100/s0056_merge_intervals/Solution.rs new file mode 100644 index 0000000..3804e88 --- /dev/null +++ b/src/main/rust/g0001_0100/s0056_merge_intervals/Solution.rs @@ -0,0 +1,29 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Sorting +// #Data_Structure_II_Day_2_Array #Level_2_Day_17_Interval #Udemy_2D_Arrays/Matrix +// #Big_O_Time_O(n_log_n)_Space_O(n) #2024_09_07_Time_3_ms_(90.96%)_Space_2.9_MB_(71.81%) + +impl Solution { + pub fn merge(intervals: Vec>) -> Vec> { + // Sort the intervals by the start value + let mut intervals = intervals; + intervals.sort_by(|a, b| a[0].cmp(&b[0])); + + let mut merged: Vec> = Vec::new(); + let mut current = intervals[0].clone(); + merged.push(current.clone()); + + for next in intervals.into_iter().skip(1) { + if current[1] >= next[0] { + current[1] = current[1].max(next[1]); + if let Some(last) = merged.last_mut() { + last[1] = current[1]; + } + } else { + current = next.clone(); + merged.push(current.clone()); + } + } + + merged + } +} diff --git a/src/main/rust/g0001_0100/s0056_merge_intervals/readme.md b/src/main/rust/g0001_0100/s0056_merge_intervals/readme.md new file mode 100644 index 0000000..0bc7988 --- /dev/null +++ b/src/main/rust/g0001_0100/s0056_merge_intervals/readme.md @@ -0,0 +1,27 @@ +56\. Merge Intervals + +Medium + +Given an array of `intervals` where intervals[i] = [starti, endi], merge all overlapping intervals, and return _an array of the non-overlapping intervals that cover all the intervals in the input_. + +**Example 1:** + +**Input:** intervals = [[1,3],[2,6],[8,10],[15,18]] + +**Output:** [[1,6],[8,10],[15,18]] + +**Explanation:** Since intervals [1,3] and [2,6] overlap, merge them into [1,6]. + +**Example 2:** + +**Input:** intervals = [[1,4],[4,5]] + +**Output:** [[1,5]] + +**Explanation:** Intervals [1,4] and [4,5] are considered overlapping. + +**Constraints:** + +* 1 <= intervals.length <= 104 +* `intervals[i].length == 2` +* 0 <= starti <= endi <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0062_unique_paths/Solution.rs b/src/main/rust/g0001_0100/s0062_unique_paths/Solution.rs new file mode 100644 index 0000000..2a97161 --- /dev/null +++ b/src/main/rust/g0001_0100/s0062_unique_paths/Solution.rs @@ -0,0 +1,29 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Dynamic_Programming #Math +// #Combinatorics #Algorithm_II_Day_13_Dynamic_Programming #Dynamic_Programming_I_Day_15 +// #Level_1_Day_11_Dynamic_Programming #Big_O_Time_O(m*n)_Space_O(m*n) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.1_MB_(22.76%) + +impl Solution { + pub fn unique_paths(m: i32, n: i32) -> i32 { + let m = m as usize; + let n = n as usize; + let mut dp = vec![vec![0; n]; m]; + + // Initialize the first row and first column + for i in 0..m { + dp[i][0] = 1; + } + for j in 0..n { + dp[0][j] = 1; + } + + // Fill the DP table + for i in 1..m { + for j in 1..n { + dp[i][j] = dp[i - 1][j] + dp[i][j - 1]; + } + } + + dp[m - 1][n - 1] + } +} diff --git a/src/main/rust/g0001_0100/s0062_unique_paths/readme.md b/src/main/rust/g0001_0100/s0062_unique_paths/readme.md new file mode 100644 index 0000000..dd7ece8 --- /dev/null +++ b/src/main/rust/g0001_0100/s0062_unique_paths/readme.md @@ -0,0 +1,35 @@ +62\. Unique Paths + +Medium + +There is a robot on an `m x n` grid. The robot is initially located at the **top-left corner** (i.e., `grid[0][0]`). The robot tries to move to the **bottom-right corner** (i.e., `grid[m - 1][n - 1]`). The robot can only move either down or right at any point in time. + +Given the two integers `m` and `n`, return _the number of possible unique paths that the robot can take to reach the bottom-right corner_. + +The test cases are generated so that the answer will be less than or equal to 2 * 109. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2018/10/22/robot_maze.png) + +**Input:** m = 3, n = 7 + +**Output:** 28 + +**Example 2:** + +**Input:** m = 3, n = 2 + +**Output:** 3 + +**Explanation:** From the top-left corner, there are a total of 3 ways to reach the bottom-right corner: + +1. Right -> Down -> Down + +2. Down -> Down -> Right + +3. Down -> Right -> Down + +**Constraints:** + +* `1 <= m, n <= 100` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0064_minimum_path_sum/Solution.rs b/src/main/rust/g0001_0100/s0064_minimum_path_sum/Solution.rs new file mode 100644 index 0000000..3b89023 --- /dev/null +++ b/src/main/rust/g0001_0100/s0064_minimum_path_sum/Solution.rs @@ -0,0 +1,26 @@ +// #Medium #Top_100_Liked_Questions #Array #Dynamic_Programming #Matrix +// #Dynamic_Programming_I_Day_16 #Udemy_Dynamic_Programming #Big_O_Time_O(m*n)_Space_O(m*n) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.5_MB_(20.18%) + +impl Solution { + pub fn min_path_sum(grid: Vec>) -> i32 { + let (w, h) = (grid.len(), grid[0].len()); + let mut dp = vec![vec![0; h]; w]; + + for i in 0..w { + for j in 0..h { + if i == 0 && j == 0 { + dp[i][j] = grid[i][j]; + } else if j == 0 { + dp[i][j] = grid[i][j] + dp[i-1][j]; + } else if i == 0 { + dp[i][j] = grid[i][j] + dp[i][j-1]; + } else { + dp[i][j] = grid[i][j] + std::cmp::min(dp[i-1][j], dp[i][j-1]); + } + } + } + + dp[w-1][h-1] + } +} diff --git a/src/main/rust/g0001_0100/s0064_minimum_path_sum/readme.md b/src/main/rust/g0001_0100/s0064_minimum_path_sum/readme.md new file mode 100644 index 0000000..b4ae093 --- /dev/null +++ b/src/main/rust/g0001_0100/s0064_minimum_path_sum/readme.md @@ -0,0 +1,30 @@ +64\. Minimum Path Sum + +Medium + +Given a `m x n` `grid` filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. + +**Note:** You can only move either down or right at any point in time. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/05/minpath.jpg) + +**Input:** grid = [[1,3,1],[1,5,1],[4,2,1]] + +**Output:** 7 + +**Explanation:** Because the path 1 → 3 → 1 → 1 → 1 minimizes the sum. + +**Example 2:** + +**Input:** grid = [[1,2,3],[4,5,6]] + +**Output:** 12 + +**Constraints:** + +* `m == grid.length` +* `n == grid[i].length` +* `1 <= m, n <= 200` +* `0 <= grid[i][j] <= 100` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0070_climbing_stairs/Solution.rs b/src/main/rust/g0001_0100/s0070_climbing_stairs/Solution.rs new file mode 100644 index 0000000..ee0dec9 --- /dev/null +++ b/src/main/rust/g0001_0100/s0070_climbing_stairs/Solution.rs @@ -0,0 +1,26 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Dynamic_Programming #Math #Memoization +// #Algorithm_I_Day_12_Dynamic_Programming #Dynamic_Programming_I_Day_2 +// #Level_1_Day_10_Dynamic_Programming #Udemy_Dynamic_Programming #Big_O_Time_O(n)_Space_O(n) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.1_MB_(16.87%) + +impl Solution { + pub fn climb_stairs(n: i32) -> i32 { + if n < 2 { + return n; + } + + let n = n as usize; + let mut cache = vec![0; n]; + + // Base cases + cache[0] = 1; + cache[1] = 2; + + // Fill the cache using dynamic programming + for i in 2..n { + cache[i] = cache[i - 1] + cache[i - 2]; + } + + cache[n - 1] + } +} diff --git a/src/main/rust/g0001_0100/s0070_climbing_stairs/readme.md b/src/main/rust/g0001_0100/s0070_climbing_stairs/readme.md new file mode 100644 index 0000000..74411f8 --- /dev/null +++ b/src/main/rust/g0001_0100/s0070_climbing_stairs/readme.md @@ -0,0 +1,37 @@ +70\. Climbing Stairs + +Easy + +You are climbing a staircase. It takes `n` steps to reach the top. + +Each time you can either climb `1` or `2` steps. In how many distinct ways can you climb to the top? + +**Example 1:** + +**Input:** n = 2 + +**Output:** 2 + +**Explanation:** There are two ways to climb to the top. + +1. 1 step + 1 step + +2. 2 steps + +**Example 2:** + +**Input:** n = 3 + +**Output:** 3 + +**Explanation:** There are three ways to climb to the top. + +1. 1 step + 1 step + 1 step + +2. 1 step + 2 steps + +3. 2 steps + 1 step + +**Constraints:** + +* `1 <= n <= 45` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0072_edit_distance/Solution.rs b/src/main/rust/g0001_0100/s0072_edit_distance/Solution.rs new file mode 100644 index 0000000..2473a64 --- /dev/null +++ b/src/main/rust/g0001_0100/s0072_edit_distance/Solution.rs @@ -0,0 +1,43 @@ +// #Medium #Top_100_Liked_Questions #String #Dynamic_Programming +// #Algorithm_II_Day_18_Dynamic_Programming #Dynamic_Programming_I_Day_19 +// #Udemy_Dynamic_Programming #Big_O_Time_O(n^2)_Space_O(n2) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.2_MB_(87.38%) + +impl Solution { + pub fn min_distance(w1: String, w2: String) -> i32 { + let n1 = w1.len(); + let n2 = w2.len(); + + // Ensure the longer word is `w1` + if n2 > n1 { + return Solution::min_distance(w2, w1); + } + + let w1_chars: Vec = w1.chars().collect(); + let w2_chars: Vec = w2.chars().collect(); + + // Initialize dp array + let mut dp = vec![0; n2 + 1]; + for j in 0..=n2 { + dp[j] = j as i32; + } + + // Dynamic programming to calculate minimum distance + for i in 1..=n1 { + let mut pre = dp[0]; + dp[0] = i as i32; + + for j in 1..=n2 { + let tmp = dp[j]; + dp[j] = if w1_chars[i - 1] != w2_chars[j - 1] { + 1 + i32::min(pre, i32::min(dp[j], dp[j - 1])) + } else { + pre + }; + pre = tmp; + } + } + + dp[n2] + } +} diff --git a/src/main/rust/g0001_0100/s0072_edit_distance/readme.md b/src/main/rust/g0001_0100/s0072_edit_distance/readme.md new file mode 100644 index 0000000..0ce10a7 --- /dev/null +++ b/src/main/rust/g0001_0100/s0072_edit_distance/readme.md @@ -0,0 +1,48 @@ +72\. Edit Distance + +Hard + +Given two strings `word1` and `word2`, return _the minimum number of operations required to convert `word1` to `word2`_. + +You have the following three operations permitted on a word: + +* Insert a character +* Delete a character +* Replace a character + +**Example 1:** + +**Input:** word1 = "horse", word2 = "ros" + +**Output:** 3 + +**Explanation:** + +horse -> rorse (replace 'h' with 'r') + +rorse -> rose (remove 'r') + +rose -> ros (remove 'e') + +**Example 2:** + +**Input:** word1 = "intention", word2 = "execution" + +**Output:** 5 + +**Explanation:** + +intention -> inention (remove 't') + +inention -> enention (replace 'i' with 'e') + +enention -> exention (replace 'n' with 'x') + +exention -> exection (replace 'n' with 'c') + +exection -> execution (insert 'u') + +**Constraints:** + +* `0 <= word1.length, word2.length <= 500` +* `word1` and `word2` consist of lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/Solution.rs b/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/Solution.rs new file mode 100644 index 0000000..0f2f65b --- /dev/null +++ b/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/Solution.rs @@ -0,0 +1,61 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Matrix +// #Udemy_2D_Arrays/Matrix #Big_O_Time_O(m*n)_Space_O(1) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.4_MB_(39.22%) + +impl Solution { + pub fn set_zeroes(matrix: &mut Vec>) { + let m = matrix.len(); + let n = matrix[0].len(); + let mut row0 = false; + let mut col0 = false; + + // Check if 0th column needs to be marked all 0s in future + for row in matrix.iter() { + if row[0] == 0 { + col0 = true; + break; + } + } + + // Check if 0th row needs to be marked all 0s in future + for j in 0..n { + if matrix[0][j] == 0 { + row0 = true; + break; + } + } + + // Store the signals in 0th row and column + for i in 1..m { + for j in 1..n { + if matrix[i][j] == 0 { + matrix[i][0] = 0; + matrix[0][j] = 0; + } + } + } + + // Mark 0 for all cells based on signal from 0th row and 0th column + for i in 1..m { + for j in 1..n { + if matrix[i][0] == 0 || matrix[0][j] == 0 { + matrix[i][j] = 0; + } + } + } + + // Set 0th column + if col0 { + for i in 0..m { + matrix[i][0] = 0; + } + } + + // Set 0th row + if row0 { + for j in 0..n { + matrix[0][j] = 0; + } + } + } +} diff --git a/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/readme.md b/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/readme.md new file mode 100644 index 0000000..dddbb62 --- /dev/null +++ b/src/main/rust/g0001_0100/s0073_set_matrix_zeroes/readme.md @@ -0,0 +1,36 @@ +73\. Set Matrix Zeroes + +Medium + +Given an `m x n` integer matrix `matrix`, if an element is `0`, set its entire row and column to `0`'s. + +You must do it [in place](https://en.wikipedia.org/wiki/In-place_algorithm). + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/08/17/mat1.jpg) + +**Input:** matrix = [[1,1,1],[1,0,1],[1,1,1]] + +**Output:** [[1,0,1],[0,0,0],[1,0,1]] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/08/17/mat2.jpg) + +**Input:** matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]] + +**Output:** [[0,0,0,0],[0,4,5,0],[0,3,1,0]] + +**Constraints:** + +* `m == matrix.length` +* `n == matrix[0].length` +* `1 <= m, n <= 200` +* -231 <= matrix[i][j] <= 231 - 1 + +**Follow up:** + +* A straightforward solution using `O(mn)` space is probably a bad idea. +* A simple improvement uses `O(m + n)` space, but still not the best solution. +* Could you devise a constant space solution? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/Solution.rs b/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/Solution.rs new file mode 100644 index 0000000..a1b6889 --- /dev/null +++ b/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/Solution.rs @@ -0,0 +1,31 @@ +// #Medium #Top_100_Liked_Questions #Array #Binary_Search #Matrix #Data_Structure_I_Day_5_Array +// #Algorithm_II_Day_1_Binary_Search #Binary_Search_I_Day_8 #Level_2_Day_8_Binary_Search +// #Udemy_2D_Arrays/Matrix #Big_O_Time_O(endRow+endCol)_Space_O(1) +// #2024_09_07_Time_1_ms_(79.35%)_Space_2.3_MB_(12.90%) + +impl Solution { + pub fn search_matrix(matrix: Vec>, target: i32) -> bool { + let end_row = matrix.len(); + let end_col = matrix[0].len(); + let mut target_row = 0; + let mut result = false; + + // Find the row where the target could be present + for i in 0..end_row { + if matrix[i][end_col - 1] >= target { + target_row = i; + break; + } + } + + // Search for the target in the identified row + for i in 0..end_col { + if matrix[target_row][i] == target { + result = true; + break; + } + } + + result + } +} diff --git a/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/readme.md b/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/readme.md new file mode 100644 index 0000000..c9eeb76 --- /dev/null +++ b/src/main/rust/g0001_0100/s0074_search_a_2d_matrix/readme.md @@ -0,0 +1,31 @@ +74\. Search a 2D Matrix + +Medium + +Write an efficient algorithm that searches for a value `target` in an `m x n` integer matrix `matrix`. This matrix has the following properties: + +* Integers in each row are sorted from left to right. +* The first integer of each row is greater than the last integer of the previous row. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/05/mat.jpg) + +**Input:** matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3 + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/10/05/mat2.jpg) + +**Input:** matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13 + +**Output:** false + +**Constraints:** + +* `m == matrix.length` +* `n == matrix[i].length` +* `1 <= m, n <= 100` +* -104 <= matrix[i][j], target <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0075_sort_colors/Solution.rs b/src/main/rust/g0001_0100/s0075_sort_colors/Solution.rs new file mode 100644 index 0000000..265b85e --- /dev/null +++ b/src/main/rust/g0001_0100/s0075_sort_colors/Solution.rs @@ -0,0 +1,30 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Sorting #Two_Pointers +// #Data_Structure_II_Day_2_Array #Udemy_Arrays #Big_O_Time_O(n)_Space_O(1) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.2_MB_(32.87%) + +impl Solution { + pub fn sort_colors(nums: &mut Vec) { + let mut zeroes = 0; + let mut ones = 0; + + // First pass: Count and place all zeroes + for i in 0..nums.len() { + if nums[i] == 0 { + nums[zeroes] = 0; + zeroes += 1; + } else if nums[i] == 1 { + ones += 1; + } + } + + // Second pass: Place all ones + for j in zeroes..(zeroes + ones) { + nums[j] = 1; + } + + // Third pass: Place all twos + for k in (zeroes + ones)..nums.len() { + nums[k] = 2; + } + } +} diff --git a/src/main/rust/g0001_0100/s0075_sort_colors/readme.md b/src/main/rust/g0001_0100/s0075_sort_colors/readme.md new file mode 100644 index 0000000..d781260 --- /dev/null +++ b/src/main/rust/g0001_0100/s0075_sort_colors/readme.md @@ -0,0 +1,29 @@ +75\. Sort Colors + +Medium + +Given an array `nums` with `n` objects colored red, white, or blue, sort them **[in-place](https://en.wikipedia.org/wiki/In-place_algorithm)** so that objects of the same color are adjacent, with the colors in the order red, white, and blue. + +We will use the integers `0`, `1`, and `2` to represent the color red, white, and blue, respectively. + +You must solve this problem without using the library's sort function. + +**Example 1:** + +**Input:** nums = [2,0,2,1,1,0] + +**Output:** [0,0,1,1,2,2] + +**Example 2:** + +**Input:** nums = [2,0,1] + +**Output:** [0,1,2] + +**Constraints:** + +* `n == nums.length` +* `1 <= n <= 300` +* `nums[i]` is either `0`, `1`, or `2`. + +**Follow up:** Could you come up with a one-pass algorithm using only constant extra space? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0076_minimum_window_substring/Solution.rs b/src/main/rust/g0001_0100/s0076_minimum_window_substring/Solution.rs new file mode 100644 index 0000000..29b9b68 --- /dev/null +++ b/src/main/rust/g0001_0100/s0076_minimum_window_substring/Solution.rs @@ -0,0 +1,42 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Sliding_Window +// #Level_2_Day_14_Sliding_Window/Two_Pointer #Big_O_Time_O(s.length())_Space_O(1) +// #2024_09_07_Time_0_ms_(100.00%)_Space_2.4_MB_(32.56%) + +impl Solution { + pub fn min_window(s: String, t: String) -> String { + let mut map = vec![0; 128]; + for ch in t.chars() { + map[ch as usize] += 1; + } + + let mut count = t.len(); + let (mut begin, mut end, mut head) = (0, 0, 0); + let mut d = usize::MAX; + + let s_chars: Vec = s.chars().collect(); + while end < s.len() { + if map[s_chars[end] as usize] > 0 { + count -= 1; + } + map[s_chars[end] as usize] -= 1; + end += 1; + + while count == 0 { + if end - begin < d { + d = end - begin; + head = begin; + } + if map[s_chars[begin] as usize] == 0 { + count += 1; + } + map[s_chars[begin] as usize] += 1; + begin += 1; + } + } + + if d == usize::MAX { + return "".to_string(); + } + s_chars[head..head + d].iter().collect() + } +} diff --git a/src/main/rust/g0001_0100/s0076_minimum_window_substring/readme.md b/src/main/rust/g0001_0100/s0076_minimum_window_substring/readme.md new file mode 100644 index 0000000..0cce2c6 --- /dev/null +++ b/src/main/rust/g0001_0100/s0076_minimum_window_substring/readme.md @@ -0,0 +1,42 @@ +76\. Minimum Window Substring + +Hard + +Given two strings `s` and `t` of lengths `m` and `n` respectively, return _the **minimum window substring** of_ `s` _such that every character in_ `t` _(**including duplicates**) is included in the window. If there is no such substring__, return the empty string_ `""`_._ + +The testcases will be generated such that the answer is **unique**. + +A **substring** is a contiguous sequence of characters within the string. + +**Example 1:** + +**Input:** s = "ADOBECODEBANC", t = "ABC" + +**Output:** "BANC" + +**Explanation:** The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t. + +**Example 2:** + +**Input:** s = "a", t = "a" + +**Output:** "a" + +**Explanation:** The entire string s is the minimum window. + +**Example 3:** + +**Input:** s = "a", t = "aa" + +**Output:** "" + +**Explanation:** Both 'a's from t must be included in the window. Since the largest window of s only has one 'a', return empty string. + +**Constraints:** + +* `m == s.length` +* `n == t.length` +* 1 <= m, n <= 105 +* `s` and `t` consist of uppercase and lowercase English letters. + +**Follow up:** Could you find an algorithm that runs in `O(m + n)` time? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0078_subsets/Solution.rs b/src/main/rust/g0001_0100/s0078_subsets/Solution.rs new file mode 100644 index 0000000..8f266a1 --- /dev/null +++ b/src/main/rust/g0001_0100/s0078_subsets/Solution.rs @@ -0,0 +1,20 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Bit_Manipulation #Backtracking +// #Algorithm_II_Day_9_Recursion_Backtracking #Udemy_Backtracking/Recursion +// #Big_O_Time_O(2^n)_Space_O(n*2^n) #2024_09_07_Time_0_ms_(100.00%)_Space_2.2_MB_(74.79%) + +impl Solution { + pub fn subsets(nums: Vec) -> Vec> { + let mut res = Vec::new(); + Self::solve(&nums, &mut vec![], &mut res, 0); + res + } + + fn solve(nums: &[i32], temp: &mut Vec, res: &mut Vec>, start: usize) { + res.push(temp.clone()); + for i in start..nums.len() { + temp.push(nums[i]); + Self::solve(nums, temp, res, i + 1); + temp.pop(); + } + } +} diff --git a/src/main/rust/g0001_0100/s0078_subsets/readme.md b/src/main/rust/g0001_0100/s0078_subsets/readme.md new file mode 100644 index 0000000..d5cf555 --- /dev/null +++ b/src/main/rust/g0001_0100/s0078_subsets/readme.md @@ -0,0 +1,25 @@ +78\. Subsets + +Medium + +Given an integer array `nums` of **unique** elements, return _all possible subsets (the power set)_. + +The solution set **must not** contain duplicate subsets. Return the solution in **any order**. + +**Example 1:** + +**Input:** nums = [1,2,3] + +**Output:** [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] + +**Example 2:** + +**Input:** nums = [0] + +**Output:** [[],[0]] + +**Constraints:** + +* `1 <= nums.length <= 10` +* `-10 <= nums[i] <= 10` +* All the numbers of `nums` are **unique**. \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0079_word_search/Solution.rs b/src/main/rust/g0001_0100/s0079_word_search/Solution.rs new file mode 100644 index 0000000..3a6079e --- /dev/null +++ b/src/main/rust/g0001_0100/s0079_word_search/Solution.rs @@ -0,0 +1,100 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Matrix #Backtracking +// #Algorithm_II_Day_11_Recursion_Backtracking #Big_O_Time_O(4^(m*n))_Space_O(m*n) +// #2024_09_08_Time_1_ms_(99.28%)_Space_2.1_MB_(93.53%) + +impl Solution { + pub fn exist(mut board: Vec>, word: String) -> bool { + let mut word = Vec::from_iter(word.chars()); + let mut map = [0; 58]; //A-65 z-122 + for i in 0..board.len() { + for j in 0..board[0].len() { + map[(board[i][j] as u8 - 65) as usize] += 1; + } + } + + for c in &word { + if map[(*c as u8 - 65) as usize] == 0 { + return false; + } + } + + if map[(word[0] as u8 - 65) as usize] > map[(word[word.len() - 1] as u8 - 65) as usize] { + word.reverse(); + } + + for i in 0..board.len() { + for j in 0..board[0].len() { + if board[i][j] != word[0] { + continue; + } + let mut p = 0; + let (mut k, mut l) = (i, j); + let mut dir = vec![-1; word.len() - 1]; + loop { + if p == word.len() - 1 { + return true; + } + if dir[p] == -1 { + board[k][l] = ' '; + dir[p] = 0; + if k > 0 && board[k - 1][l] == word[p + 1] { + p += 1; + k -= 1; + continue; + } + } + if dir[p] == 0 { + dir[p] = 1; + if l < board[k].len() - 1 && board[k][l + 1] == word[p + 1] { + p += 1; + l += 1; + continue; + } + } + if dir[p] == 1 { + dir[p] = 2; + if k < board.len() - 1 && board[k + 1][l] == word[p + 1] { + p += 1; + k += 1; + continue; + } + } + if dir[p] == 2 { + dir[p] = 3; + if l > 0 && board[k][l - 1] == word[p + 1] { + p += 1; + l -= 1; + continue; + } + } + while p > 0 && dir[p] == 3 { + board[k][l] = word[p]; + dir[p] = -1; + p -= 1; + if dir[p] == 0 { + k += 1; + continue; + } + if dir[p] == 1 { + l -= 1; + continue; + } + if dir[p] == 2 { + k -= 1; + continue; + } + if dir[p] == 3 { + l += 1; + continue; + } + } + if p == 0 && dir[p] == 3 { + board[k][l] = word[p]; + break; + } + } + } + } + false + } +} diff --git a/src/main/rust/g0001_0100/s0079_word_search/readme.md b/src/main/rust/g0001_0100/s0079_word_search/readme.md new file mode 100644 index 0000000..b0f66ed --- /dev/null +++ b/src/main/rust/g0001_0100/s0079_word_search/readme.md @@ -0,0 +1,41 @@ +79\. Word Search + +Medium + +Given an `m x n` grid of characters `board` and a string `word`, return `true` _if_ `word` _exists in the grid_. + +The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/04/word2.jpg) + +**Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCCED" + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/11/04/word-1.jpg) + +**Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "SEE" + +**Output:** true + +**Example 3:** + +![](https://assets.leetcode.com/uploads/2020/10/15/word3.jpg) + +**Input:** board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = "ABCB" + +**Output:** false + +**Constraints:** + +* `m == board.length` +* `n = board[i].length` +* `1 <= m, n <= 6` +* `1 <= word.length <= 15` +* `board` and `word` consists of only lowercase and uppercase English letters. + +**Follow up:** Could you use search pruning to make your solution faster with a larger `board`? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/Solution.rs b/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/Solution.rs new file mode 100644 index 0000000..599b049 --- /dev/null +++ b/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/Solution.rs @@ -0,0 +1,61 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Array #Stack #Monotonic_Stack +// #Big_O_Time_O(n_log_n)_Space_O(log_n) #2024_09_08_Time_7_ms_(92.48%)_Space_3.2_MB_(96.24%) + +impl Solution { + pub fn largest_rectangle_area(heights: Vec) -> i32 { + Self::largest_area(&heights, 0, heights.len()) + } + + fn largest_area(heights: &[i32], start: usize, limit: usize) -> i32 { + if heights.is_empty() || start == limit { + return 0; + } + if limit - start == 1 { + return heights[start]; + } + if limit - start == 2 { + let max_of_two_bars = heights[start].max(heights[start + 1]); + let area_from_two = heights[start].min(heights[start + 1]) * 2; + return max_of_two_bars.max(area_from_two); + } + if Self::check_if_sorted(heights, start, limit) { + let mut max_when_sorted = 0; + for i in start..limit { + max_when_sorted = max_when_sorted.max(heights[i] * (limit - i) as i32); + } + return max_when_sorted; + } else { + let min_ind = Self::find_min_in_array(heights, start, limit); + return Self::max_of_three_nums( + Self::largest_area(heights, start, min_ind), + heights[min_ind] * (limit - start) as i32, + Self::largest_area(heights, min_ind + 1, limit), + ); + } + } + + fn find_min_in_array(heights: &[i32], start: usize, limit: usize) -> usize { + let mut min = i32::MAX; + let mut min_index = 0; + for i in start..limit { + if heights[i] < min { + min = heights[i]; + min_index = i; + } + } + min_index + } + + fn check_if_sorted(heights: &[i32], start: usize, limit: usize) -> bool { + for i in start + 1..limit { + if heights[i] < heights[i - 1] { + return false; + } + } + true + } + + fn max_of_three_nums(a: i32, b: i32, c: i32) -> i32 { + a.max(b).max(c) + } +} diff --git a/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md b/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md new file mode 100644 index 0000000..98feea3 --- /dev/null +++ b/src/main/rust/g0001_0100/s0084_largest_rectangle_in_histogram/readme.md @@ -0,0 +1,30 @@ +84\. Largest Rectangle in Histogram + +Hard + +Given an array of integers `heights` representing the histogram's bar height where the width of each bar is `1`, return _the area of the largest rectangle in the histogram_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/01/04/histogram.jpg) + +**Input:** heights = [2,1,5,6,2,3] + +**Output:** 10 + +**Explanation:** The above is a histogram where width of each bar is 1. + +The largest rectangle is shown in the red area, which has an area = 10 units. + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/01/04/histogram-1.jpg) + +**Input:** heights = [2,4] + +**Output:** 4 + +**Constraints:** + +* 1 <= heights.length <= 105 +* 0 <= heights[i] <= 104 \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/Solution.rs b/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/Solution.rs new file mode 100644 index 0000000..0c4c953 --- /dev/null +++ b/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/Solution.rs @@ -0,0 +1,36 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Depth_First_Search #Tree #Binary_Tree +// #Stack #Data_Structure_I_Day_10_Tree #Udemy_Tree_Stack_Queue #Big_O_Time_O(n)_Space_O(n) +// #2024_09_08_Time_0_ms_(100.00%)_Space_2.2_MB_(33.33%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn inorder_traversal(root: Option>>) -> Vec { + root.map(|root| { + let n = root.borrow(); + let mut result = Self::inorder_traversal(n.left.clone()); + result.push(n.val); + result.extend(Self::inorder_traversal(n.right.clone())); + result + }) + .unwrap_or_default() + } +} diff --git a/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md b/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md new file mode 100644 index 0000000..5068d01 --- /dev/null +++ b/src/main/rust/g0001_0100/s0094_binary_tree_inorder_traversal/readme.md @@ -0,0 +1,48 @@ +94\. Binary Tree Inorder Traversal + +Easy + +Given the `root` of a binary tree, return _the inorder traversal of its nodes' values_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/09/15/inorder_1.jpg) + +**Input:** root = [1,null,2,3] + +**Output:** [1,3,2] + +**Example 2:** + +**Input:** root = [] + +**Output:** [] + +**Example 3:** + +**Input:** root = [1] + +**Output:** [1] + +**Example 4:** + +![](https://assets.leetcode.com/uploads/2020/09/15/inorder_5.jpg) + +**Input:** root = [1,2] + +**Output:** [2,1] + +**Example 5:** + +![](https://assets.leetcode.com/uploads/2020/09/15/inorder_4.jpg) + +**Input:** root = [1,null,2] + +**Output:** [1,2] + +**Constraints:** + +* The number of nodes in the tree is in the range `[0, 100]`. +* `-100 <= Node.val <= 100` + +**Follow up:** Recursive solution is trivial, could you do it iteratively? \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/Solution.rs b/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/Solution.rs new file mode 100644 index 0000000..b3b20b2 --- /dev/null +++ b/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/Solution.rs @@ -0,0 +1,15 @@ +// #Medium #Dynamic_Programming #Math #Tree #Binary_Tree #Binary_Search_Tree +// #Dynamic_Programming_I_Day_11 #Big_O_Time_O(n)_Space_O(1) +// #2024_09_08_Time_0_ms_(100.00%)_Space_2.1_MB_(20.00%) + +impl Solution { + pub fn num_trees(n: i32) -> i32 { + let mut result: i64 = 1; + for i in 0..n { + result *= 2 * (n as i64) - (i as i64); + result /= (i + 1) as i64; + } + result /= (n + 1) as i64; + result as i32 + } +} diff --git a/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/readme.md b/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/readme.md new file mode 100644 index 0000000..9f10175 --- /dev/null +++ b/src/main/rust/g0001_0100/s0096_unique_binary_search_trees/readme.md @@ -0,0 +1,23 @@ +96\. Unique Binary Search Trees + +Medium + +Given an integer `n`, return _the number of structurally unique **BST'**s (binary search trees) which has exactly_ `n` _nodes of unique values from_ `1` _to_ `n`. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/01/18/uniquebstn3.jpg) + +**Input:** n = 3 + +**Output:** 5 + +**Example 2:** + +**Input:** n = 1 + +**Output:** 1 + +**Constraints:** + +* `1 <= n <= 19` \ No newline at end of file diff --git a/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/Solution.rs b/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/Solution.rs new file mode 100644 index 0000000..e30327d --- /dev/null +++ b/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/Solution.rs @@ -0,0 +1,41 @@ +// #Medium #String #Dynamic_Programming #2024_09_08_Time_1_ms_(77.46%)_Space_2.2_MB_(26.76%) + +impl Solution { + pub fn is_interleave(s1: String, s2: String, s3: String) -> bool { + let mut state = vec![vec![None::; s2.len() + 1]; s1.len() + 1]; + is_interleave_0(&s1, &s2, &s3, &mut state) + } +} + +fn is_interleave_0(s1: &str, s2: &str, s3: &str, state: &mut Vec>>) -> bool { + if let Some(result) = state[s1.len()][s2.len()] { + return result; + } + + if s1.len() + s2.len() != s3.len() { + return false; + } + + if s1.is_empty() { + return s2 == s3; + } + + if s2.is_empty() { + return s1 == s3; + } + + let (head1, tail1) = s1.split_at(1); + let (head2, tail2) = s2.split_at(1); + let (head3, tail3) = s3.split_at(1); + + if head1 == head3 && is_interleave_0(tail1, s2, tail3, state) { + state[s1.len()][s2.len()] = Some(true); + return true; + } else if head2 == head3 && is_interleave_0(s1, tail2, tail3, state) { + state[s1.len()][s2.len()] = Some(true); + return true; + } else { + state[s1.len()][s2.len()] = Some(false); + return false; + } +} diff --git a/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/readme.md b/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/readme.md new file mode 100644 index 0000000..fbcaf2f --- /dev/null +++ b/src/main/rust/g0001_0100/s0098_validate_binary_search_tree/readme.md @@ -0,0 +1,34 @@ +98\. Validate Binary Search Tree + +Medium + +Given the `root` of a binary tree, _determine if it is a valid binary search tree (BST)_. + +A **valid BST** is defined as follows: + +* The left subtree of a node contains only nodes with keys **less than** the node's key. +* The right subtree of a node contains only nodes with keys **greater than** the node's key. +* Both the left and right subtrees must also be binary search trees. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/12/01/tree1.jpg) + +**Input:** root = [2,1,3] + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/12/01/tree2.jpg) + +**Input:** root = [5,1,4,null,null,3,6] + +**Output:** false + +**Explanation:** The root node's value is 5 but its right child's value is 4. + +**Constraints:** + +* The number of nodes in the tree is in the range [1, 104]. +* -231 <= Node.val <= 231 - 1 \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0101_symmetric_tree/Solution.rs b/src/main/rust/g0101_0200/s0101_symmetric_tree/Solution.rs new file mode 100644 index 0000000..c61af57 --- /dev/null +++ b/src/main/rust/g0101_0200/s0101_symmetric_tree/Solution.rs @@ -0,0 +1,45 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Depth_First_Search #Breadth_First_Search +// #Tree #Binary_Tree #Data_Structure_I_Day_11_Tree #Level_2_Day_15_Tree +// #Big_O_Time_O(N)_Space_O(log(N)) #2024_09_08_Time_0_ms_(100.00%)_Space_2.2_MB_(78.98%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn is_symmetric(root: Option>>) -> bool { + fn compare(l: Option>>, r: Option>>) -> bool { + match (l, r) { + (None, None) => true, + (None, Some(n)) | (Some(n), None) => false, + (Some(l), Some(r)) => { + if l.borrow().val != r.borrow().val { + return false; + } + return compare(l.borrow().left.clone(), r.borrow().right.clone()) + && compare(l.borrow().right.clone(), r.borrow().left.clone()) + } + } + } + match root { + Some(r) => compare(r.borrow().left.clone(), r.borrow().right.clone()), + None => true + } + } +} diff --git a/src/main/rust/g0101_0200/s0101_symmetric_tree/readme.md b/src/main/rust/g0101_0200/s0101_symmetric_tree/readme.md new file mode 100644 index 0000000..065c9c1 --- /dev/null +++ b/src/main/rust/g0101_0200/s0101_symmetric_tree/readme.md @@ -0,0 +1,28 @@ +101\. Symmetric Tree + +Easy + +Given the `root` of a binary tree, _check whether it is a mirror of itself_ (i.e., symmetric around its center). + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/02/19/symtree1.jpg) + +**Input:** root = [1,2,2,3,4,4,3] + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/02/19/symtree2.jpg) + +**Input:** root = [1,2,2,null,3,null,3] + +**Output:** false + +**Constraints:** + +* The number of nodes in the tree is in the range `[1, 1000]`. +* `-100 <= Node.val <= 100` + +**Follow up:** Could you solve it both recursively and iteratively? \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/Solution.rs b/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/Solution.rs new file mode 100644 index 0000000..d64db1c --- /dev/null +++ b/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/Solution.rs @@ -0,0 +1,48 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Breadth_First_Search #Tree +// #Binary_Tree #Data_Structure_I_Day_11_Tree #Level_1_Day_6_Tree #Udemy_Tree_Stack_Queue +// #Big_O_Time_O(N)_Space_O(N) #2024_09_08_Time_1_ms_(80.61%)_Space_2.4_MB_(24.49%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::cell::RefCell; +use std::collections::VecDeque; +use std::rc::Rc; +impl Solution { + pub fn level_order(root: Option>>) -> Vec> { + let mut q = VecDeque::new(); + let mut ans: Vec> = Vec::new(); + q.push_back(vec![root]); + while let Some(cur_level) = q.pop_front() { + let mut cur_level_vals = Vec::new(); + let mut children = Vec::new(); + for node_option in cur_level { + if let Some(node) = node_option { + cur_level_vals.push(node.borrow().val); + children.push(node.borrow().left.clone()); + children.push(node.borrow().right.clone()); + } + } + if cur_level_vals.len() > 0 { + ans.push(cur_level_vals); + q.push_back(children); + } + } + return ans; + } +} diff --git a/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md b/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md new file mode 100644 index 0000000..51b0640 --- /dev/null +++ b/src/main/rust/g0101_0200/s0102_binary_tree_level_order_traversal/readme.md @@ -0,0 +1,30 @@ +102\. Binary Tree Level Order Traversal + +Medium + +Given the `root` of a binary tree, return _the level order traversal of its nodes' values_. (i.e., from left to right, level by level). + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg) + +**Input:** root = [3,9,20,null,null,15,7] + +**Output:** [[3],[9,20],[15,7]] + +**Example 2:** + +**Input:** root = [1] + +**Output:** [[1]] + +**Example 3:** + +**Input:** root = [] + +**Output:** [] + +**Constraints:** + +* The number of nodes in the tree is in the range `[0, 2000]`. +* `-1000 <= Node.val <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/Solution.rs b/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/Solution.rs new file mode 100644 index 0000000..c8ef724 --- /dev/null +++ b/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/Solution.rs @@ -0,0 +1,36 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Depth_First_Search #Breadth_First_Search +// #Tree #Binary_Tree #Data_Structure_I_Day_11_Tree +// #Programming_Skills_I_Day_10_Linked_List_and_Tree #Udemy_Tree_Stack_Queue +// #Big_O_Time_O(N)_Space_O(H) #2024_09_08_Time_1_ms_(80.46%)_Space_2.7_MB_(50.19%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +use std::cmp::max; +impl Solution { + pub fn max_depth(root: Option>>) -> i32 { + match root { + None => 0, + Some(root) => { + 1+max(Self::max_depth(root.borrow().left.clone()),Self::max_depth(root.borrow().right.clone())) + } + } + } +} diff --git a/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md b/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md new file mode 100644 index 0000000..8961bcb --- /dev/null +++ b/src/main/rust/g0101_0200/s0104_maximum_depth_of_binary_tree/readme.md @@ -0,0 +1,26 @@ +104\. Maximum Depth of Binary Tree + +Easy + +Given the `root` of a binary tree, return _its maximum depth_. + +A binary tree's **maximum depth** is the number of nodes along the longest path from the root node down to the farthest leaf node. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/26/tmp-tree.jpg) + +**Input:** root = [3,9,20,null,null,15,7] + +**Output:** 3 + +**Example 2:** + +**Input:** root = [1,null,2] + +**Output:** 2 + +**Constraints:** + +* The number of nodes in the tree is in the range [0, 104]. +* `-100 <= Node.val <= 100` \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/Solution.rs b/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/Solution.rs new file mode 100644 index 0000000..dd08ba0 --- /dev/null +++ b/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/Solution.rs @@ -0,0 +1,45 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Tree #Binary_Tree +// #Divide_and_Conquer #Data_Structure_II_Day_15_Tree #Big_O_Time_O(N)_Space_O(N) +// #2024_09_08_Time_2_ms_(84.72%)_Space_2.9_MB_(25.00%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::collections::HashMap; +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn build_tree(preorder: Vec, inorder: Vec) -> Option>> { + let mut map = HashMap::new(); // Creating map + let n = inorder.len(); + for i in 0..n { + map.insert(inorder[i], i); // storing index of inorder value for later purpose + } + return Self::f(0, n-1, 0, n-1, &preorder, &inorder, &map); + } + fn f(pre_st:usize,pre_en:usize,in_st:usize,in_en:usize,preorder:&Vec, + inorder:&Vec,map:&HashMap)->Option>> { + if pre_st > pre_en || in_st > in_en {return None;} // if there is no node to make return none + let root = Rc::new(RefCell::new(TreeNode{ val : preorder[pre_st], left : None, right : None})); + let ind = map.get(&root.borrow().val); // using the map to get the index of root in inorder vector + let len = ind.unwrap() - in_st; // lenght of left subtree + root.borrow_mut().left = Self::f(pre_st+1,pre_st+len,in_st,ind.unwrap()-1,preorder,inorder,map); + root.borrow_mut().right = Self::f(pre_st+len+1,pre_en,ind.unwrap()+1,in_en,preorder,inorder,map); + return Some(root); + } +} diff --git a/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md b/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md new file mode 100644 index 0000000..795543e --- /dev/null +++ b/src/main/rust/g0101_0200/s0105_construct_binary_tree_from_preorder_and_inorder_traversal/readme.md @@ -0,0 +1,29 @@ +105\. Construct Binary Tree from Preorder and Inorder Traversal + +Medium + +Given two integer arrays `preorder` and `inorder` where `preorder` is the preorder traversal of a binary tree and `inorder` is the inorder traversal of the same tree, construct and return _the binary tree_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/02/19/tree.jpg) + +**Input:** preorder = [3,9,20,15,7], inorder = [9,3,15,20,7] + +**Output:** [3,9,20,null,null,15,7] + +**Example 2:** + +**Input:** preorder = [-1], inorder = [-1] + +**Output:** [-1] + +**Constraints:** + +* `1 <= preorder.length <= 3000` +* `inorder.length == preorder.length` +* `-3000 <= preorder[i], inorder[i] <= 3000` +* `preorder` and `inorder` consist of **unique** values. +* Each value of `inorder` also appears in `preorder`. +* `preorder` is **guaranteed** to be the preorder traversal of the tree. +* `inorder` is **guaranteed** to be the inorder traversal of the tree. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/Solution.rs b/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/Solution.rs new file mode 100644 index 0000000..958dc63 --- /dev/null +++ b/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/Solution.rs @@ -0,0 +1,42 @@ +// #Medium #Array #Hash_Table #Tree #Binary_Tree #Divide_and_Conquer +// #2024_09_08_Time_0_ms_(100.00%)_Space_2.7_MB_(50.00%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +type Node = Option>>; +impl Solution { + pub fn build_tree(inorder: Vec, postorder: Vec) -> Node { + Solution::builder(&inorder[..], &postorder[..]) + } + fn builder(inorder: &[i32], postorder: &[i32]) -> Node { + let i = inorder.len(); + if inorder.is_empty() || postorder.is_empty() { + return None + } else { + let n = postorder.len() -1; + let mut root = TreeNode::new(postorder[n]); + let m = inorder.iter().position(|&x| x == postorder[n]).unwrap(); + root.left = Solution::builder(&inorder[0..m], &postorder[0..m]); + root.right = Solution::builder(&inorder[m+1..i], &postorder[m..i-1]); + Some(Rc::new(RefCell::new(root))) + } + } +} diff --git a/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md b/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md new file mode 100644 index 0000000..52cab46 --- /dev/null +++ b/src/main/rust/g0101_0200/s0114_flatten_binary_tree_to_linked_list/readme.md @@ -0,0 +1,35 @@ +114\. Flatten Binary Tree to Linked List + +Medium + +Given the `root` of a binary tree, flatten the tree into a "linked list": + +* The "linked list" should use the same `TreeNode` class where the `right` child pointer points to the next node in the list and the `left` child pointer is always `null`. +* The "linked list" should be in the same order as a [**pre-order** **traversal**](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR) of the binary tree. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/01/14/flaten.jpg) + +**Input:** root = [1,2,5,3,4,null,6] + +**Output:** [1,null,2,null,3,null,4,null,5,null,6] + +**Example 2:** + +**Input:** root = [] + +**Output:** [] + +**Example 3:** + +**Input:** root = [0] + +**Output:** [0] + +**Constraints:** + +* The number of nodes in the tree is in the range `[0, 2000]`. +* `-100 <= Node.val <= 100` + +**Follow up:** Can you flatten the tree in-place (with `O(1)` extra space)? \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/Solution.rs b/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/Solution.rs new file mode 100644 index 0000000..77fede4 --- /dev/null +++ b/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/Solution.rs @@ -0,0 +1,21 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming +// #Data_Structure_I_Day_3_Array #Dynamic_Programming_I_Day_7 #Level_1_Day_5_Greedy #Udemy_Arrays +// #Big_O_Time_O(N)_Space_O(1) #2024_09_09_Time_3_ms_(98.62%)_Space_3_MB_(9.92%) + + +impl Solution { + pub fn max_profit(prices: Vec) -> i32 { + let mut max_profit = 0; + let mut min_price = prices[0]; + + for price in prices.iter().skip(1) { + if *price > min_price { + max_profit = max_profit.max(*price - min_price); + } else { + min_price = *price; + } + } + + max_profit + } +} diff --git a/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/readme.md b/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/readme.md new file mode 100644 index 0000000..e3ab951 --- /dev/null +++ b/src/main/rust/g0101_0200/s0121_best_time_to_buy_and_sell_stock/readme.md @@ -0,0 +1,32 @@ +121\. Best Time to Buy and Sell Stock + +Easy + +You are given an array `prices` where `prices[i]` is the price of a given stock on the ith day. + +You want to maximize your profit by choosing a **single day** to buy one stock and choosing a **different day in the future** to sell that stock. + +Return _the maximum profit you can achieve from this transaction_. If you cannot achieve any profit, return `0`. + +**Example 1:** + +**Input:** prices = [7,1,5,3,6,4] + +**Output:** 5 + +**Explanation:** Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5. + +Note that buying on day 2 and selling on day 1 is not allowed because you must buy before you sell. + +**Example 2:** + +**Input:** prices = [7,6,4,3,1] + +**Output:** 0 + +**Explanation:** In this case, no transactions are done and the max profit = 0. + +**Constraints:** + +* 1 <= prices.length <= 105 +* 0 <= prices[i] <= 104 \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/Solution.rs b/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/Solution.rs new file mode 100644 index 0000000..af16d57 --- /dev/null +++ b/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/Solution.rs @@ -0,0 +1,43 @@ +// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Dynamic_Programming #Depth_First_Search +// #Tree #Binary_Tree #Udemy_Tree_Stack_Queue #Big_O_Time_O(N)_Space_O(N) +// #2024_09_09_Time_0_ms_(100.00%)_Space_4.3_MB_(90.79%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn max_path_sum(root: Option>>) -> i32 { + let mut max = i32::MIN; + Solution::helper(&root, &mut max); + max + } + + fn helper(node: &Option>>, max: &mut i32) -> i32 { + if let Some(n) = node { + let n = n.borrow(); + let left = Solution::helper(&n.left, max).max(0); + let right = Solution::helper(&n.right, max).max(0); + let current = n.val + left + right; + *max = (*max).max(current); + return n.val + left.max(right); + } + 0 + } +} diff --git a/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md b/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md new file mode 100644 index 0000000..7e57e58 --- /dev/null +++ b/src/main/rust/g0101_0200/s0124_binary_tree_maximum_path_sum/readme.md @@ -0,0 +1,34 @@ +124\. Binary Tree Maximum Path Sum + +Hard + +A **path** in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence **at most once**. Note that the path does not need to pass through the root. + +The **path sum** of a path is the sum of the node's values in the path. + +Given the `root` of a binary tree, return _the maximum **path sum** of any **non-empty** path_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/10/13/exx1.jpg) + +**Input:** root = [1,2,3] + +**Output:** 6 + +**Explanation:** The optimal path is 2 -> 1 -> 3 with a path sum of 2 + 1 + 3 = 6. + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/10/13/exx2.jpg) + +**Input:** root = [-10,9,20,null,null,15,7] + +**Output:** 42 + +**Explanation:** The optimal path is 15 -> 20 -> 7 with a path sum of 15 + 20 + 7 = 42. + +**Constraints:** + +* The number of nodes in the tree is in the range [1, 3 * 104]. +* `-1000 <= Node.val <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/Solution.rs b/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/Solution.rs new file mode 100644 index 0000000..88ae0b9 --- /dev/null +++ b/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/Solution.rs @@ -0,0 +1,27 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Union_Find +// #Big_O_Time_O(N_log_N)_Space_O(1) #2024_09_09_Time_4_ms_(99.44%)_Space_3.4_MB_(62.78%) + +impl Solution { + pub fn longest_consecutive(nums: Vec) -> i32 { + if nums.is_empty() { + return 0; + } + + let mut nums = nums; + nums.sort_unstable(); // Equivalent to Arrays.sort in Java + + let mut max = i32::MIN; + let mut ths_max = 1; + + for i in 0..nums.len() - 1 { + if nums[i + 1] == nums[i] + 1 { + ths_max += 1; + } else if nums[i + 1] != nums[i] { + max = max.max(ths_max); + ths_max = 1; + } + } + + max.max(ths_max) // Return the maximum sequence length + } +} diff --git a/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/readme.md b/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/readme.md new file mode 100644 index 0000000..6b8cd25 --- /dev/null +++ b/src/main/rust/g0101_0200/s0128_longest_consecutive_sequence/readme.md @@ -0,0 +1,26 @@ +128\. Longest Consecutive Sequence + +Medium + +Given an unsorted array of integers `nums`, return _the length of the longest consecutive elements sequence._ + +You must write an algorithm that runs in `O(n)` time. + +**Example 1:** + +**Input:** nums = [100,4,200,1,3,2] + +**Output:** 4 + +**Explanation:** The longest consecutive elements sequence is `[1, 2, 3, 4]`. Therefore its length is 4. + +**Example 2:** + +**Input:** nums = [0,3,7,2,5,8,4,6,0,1] + +**Output:** 9 + +**Constraints:** + +* 0 <= nums.length <= 105 +* -109 <= nums[i] <= 109 \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0131_palindrome_partitioning/Solution.rs b/src/main/rust/g0101_0200/s0131_palindrome_partitioning/Solution.rs new file mode 100644 index 0000000..962692b --- /dev/null +++ b/src/main/rust/g0101_0200/s0131_palindrome_partitioning/Solution.rs @@ -0,0 +1,35 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Dynamic_Programming +// #Backtracking #Big_O_Time_O(N*2^N)_Space_O(2^N*N) +// #2024_09_09_Time_65_ms_(85.18%)_Space_20.6_MB_(68.52%) + +impl Solution { + pub fn partition(s: String) -> Vec> { + let mut res = Vec::new(); + let mut curr_arr = Vec::new(); + Self::backtracking(&mut res, &mut curr_arr, &s, 0); + res + } + + fn backtracking(res: &mut Vec>, curr_arr: &mut Vec, s: &str, start: usize) { + if start == s.len() { + res.push(curr_arr.clone()); + return; + } + for end in start..s.len() { + if !Self::is_palindrome(s, start, end) { + continue; + } + curr_arr.push(s[start..=end].to_string()); + Self::backtracking(res, curr_arr, s, end + 1); + curr_arr.pop(); + } + } + + fn is_palindrome(s: &str, mut start: usize, mut end: usize) -> bool { + while start < end && s.as_bytes()[start] == s.as_bytes()[end] { + start += 1; + end -= 1; + } + start >= end + } +} diff --git a/src/main/rust/g0101_0200/s0131_palindrome_partitioning/readme.md b/src/main/rust/g0101_0200/s0131_palindrome_partitioning/readme.md new file mode 100644 index 0000000..e46a6c4 --- /dev/null +++ b/src/main/rust/g0101_0200/s0131_palindrome_partitioning/readme.md @@ -0,0 +1,24 @@ +131\. Palindrome Partitioning + +Medium + +Given a string `s`, partition `s` such that every substring of the partition is a **palindrome**. Return all possible palindrome partitioning of `s`. + +A **palindrome** string is a string that reads the same backward as forward. + +**Example 1:** + +**Input:** s = "aab" + +**Output:** [["a","a","b"],["aa","b"]] + +**Example 2:** + +**Input:** s = "a" + +**Output:** [["a"]] + +**Constraints:** + +* `1 <= s.length <= 16` +* `s` contains only lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0136_single_number/Solution.rs b/src/main/rust/g0101_0200/s0136_single_number/Solution.rs new file mode 100644 index 0000000..e50ad3d --- /dev/null +++ b/src/main/rust/g0101_0200/s0136_single_number/Solution.rs @@ -0,0 +1,13 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Bit_Manipulation +// #Data_Structure_II_Day_1_Array #Algorithm_I_Day_14_Bit_Manipulation #Udemy_Integers +// #Big_O_Time_O(N)_Space_O(1) #2024_09_09_Time_0_ms_(100.00%)_Space_2.2_MB_(45.48%) + +impl Solution { + pub fn single_number(nums: Vec) -> i32 { + let mut res = 0; + for num in nums { + res ^= num; + } + res + } +} diff --git a/src/main/rust/g0101_0200/s0136_single_number/readme.md b/src/main/rust/g0101_0200/s0136_single_number/readme.md new file mode 100644 index 0000000..2805716 --- /dev/null +++ b/src/main/rust/g0101_0200/s0136_single_number/readme.md @@ -0,0 +1,31 @@ +136\. Single Number + +Easy + +Given a **non-empty** array of integers `nums`, every element appears _twice_ except for one. Find that single one. + +You must implement a solution with a linear runtime complexity and use only constant extra space. + +**Example 1:** + +**Input:** nums = [2,2,1] + +**Output:** 1 + +**Example 2:** + +**Input:** nums = [4,1,2,1,2] + +**Output:** 4 + +**Example 3:** + +**Input:** nums = [1] + +**Output:** 1 + +**Constraints:** + +* 1 <= nums.length <= 3 * 104 +* -3 * 104 <= nums[i] <= 3 * 104 +* Each element in the array appears twice except for one element which appears only once. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0139_word_break/Solution.rs b/src/main/rust/g0101_0200/s0139_word_break/Solution.rs new file mode 100644 index 0000000..6258884 --- /dev/null +++ b/src/main/rust/g0101_0200/s0139_word_break/Solution.rs @@ -0,0 +1,30 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table +// #Dynamic_Programming #Trie #Memoization #Algorithm_II_Day_15_Dynamic_Programming +// #Dynamic_Programming_I_Day_9 #Udemy_Dynamic_Programming #Big_O_Time_O(M+max*N)_Space_O(M+N+max) +// #2024_09_09_Time_0_ms_(100.00%)_Space_2.2_MB_(77.19%) + +impl Solution { + pub fn word_break(s: String, word_dict: Vec) -> bool { + let mut state = vec![None::; s.len() + 1]; + word_break_0(&s, &word_dict, &mut state) + } +} + +fn word_break_0(s: &str, word_dict: &Vec, state: &mut Vec>) -> bool { + if s.is_empty() { + return true; + } + + if let Some(result) = state[s.len()] { + return result; + } + + let result = word_dict + .iter() + .filter_map(|word| s.strip_prefix(word)) + .any(|new_s| word_break_0(new_s, word_dict, state)); + + state[s.len()] = Some(result); + + result +} diff --git a/src/main/rust/g0101_0200/s0139_word_break/readme.md b/src/main/rust/g0101_0200/s0139_word_break/readme.md new file mode 100644 index 0000000..b553a1b --- /dev/null +++ b/src/main/rust/g0101_0200/s0139_word_break/readme.md @@ -0,0 +1,39 @@ +139\. Word Break + +Medium + +Given a string `s` and a dictionary of strings `wordDict`, return `true` if `s` can be segmented into a space-separated sequence of one or more dictionary words. + +**Note** that the same word in the dictionary may be reused multiple times in the segmentation. + +**Example 1:** + +**Input:** s = "leetcode", wordDict = ["leet","code"] + +**Output:** true + +**Explanation:** Return true because "leetcode" can be segmented as "leet code". + +**Example 2:** + +**Input:** s = "applepenapple", wordDict = ["apple","pen"] + +**Output:** true + +**Explanation:** Return true because "applepenapple" can be segmented as "apple pen apple". + +Note that you are allowed to reuse a dictionary word. + +**Example 3:** + +**Input:** s = "catsandog", wordDict = ["cats","dog","sand","and","cat"] + +**Output:** false + +**Constraints:** + +* `1 <= s.length <= 300` +* `1 <= wordDict.length <= 1000` +* `1 <= wordDict[i].length <= 20` +* `s` and `wordDict[i]` consist of only lowercase English letters. +* All the strings of `wordDict` are **unique**. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0146_lru_cache/LRUCache.rs b/src/main/rust/g0101_0200/s0146_lru_cache/LRUCache.rs new file mode 100644 index 0000000..2d89a3e --- /dev/null +++ b/src/main/rust/g0101_0200/s0146_lru_cache/LRUCache.rs @@ -0,0 +1,155 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Hash_Table #Design #Linked_List +// #Doubly_Linked_List #Udemy_Linked_List #Big_O_Time_O(1)_Space_O(capacity) +// #2024_09_09_Time_90_ms_(75.18%)_Space_104_MB_(9.93%) + +struct LRUCache { + map: HashMap>>, + list: LinkedList, + size: i32, + capacity: i32, +} + + +/** + * `&self` means the method takes an immutable reference. + * If you need a mutable reference, change it to `&mut self` instead. + */ +use std::cell::RefCell; +use std::collections::HashMap; +use std::rc::Rc; + +struct Node { + key: i32, + value: i32, + prev: Option>>, + next: Option>>, +} + +#[derive(Default)] +struct LinkedList { + head: Option>>, + tail: Option>>, +} + +impl LinkedList { + fn new() -> LinkedList { + Default::default() + } + + fn move_to_head(&mut self, node: &Rc>) { + let prev = node.borrow().prev.as_ref().map(|a| Rc::clone(a)); + let next = node.borrow().next.as_ref().map(|a| Rc::clone(a)); + match (&prev, &next) { + (None, None) => { + // this is the only node in list, so do nothng + } + (Some(_), None) => { + // this node is already the head, so do nothing + } + (None, Some(next)) => { + // this is the tail, move it to front + node.borrow_mut().next = None; + node.borrow_mut().prev = None; + next.borrow_mut().prev = None; + self.tail = Some(Rc::clone(next)); + + let prev_head = self.head.as_ref().unwrap(); + prev_head.borrow_mut().next = Some(Rc::clone(node)); + node.borrow_mut().prev = Some(Rc::clone(prev_head)); + self.head = Some(Rc::clone(node)); + } + (Some(prev), Some(next)) => { + node.borrow_mut().next = None; + node.borrow_mut().prev = None; + + prev.borrow_mut().next = Some(Rc::clone(next)); + next.borrow_mut().prev = Some(Rc::clone(prev)); + + let prev_head = self.head.as_ref().unwrap(); + prev_head.borrow_mut().next = Some(Rc::clone(node)); + node.borrow_mut().prev = Some(Rc::clone(prev_head)); + self.head = Some(Rc::clone(node)); + } + } + } + + fn push_front(&mut self, node: &Rc>) { + match &self.head { + None => { + self.head = Some(Rc::clone(node)); + self.tail = Some(Rc::clone(node)); + } + Some(prev_head) => { + Rc::clone(node).borrow_mut().prev = Some(Rc::clone(prev_head)); + prev_head.borrow_mut().next = Some(Rc::clone(node)); + self.head = Some(Rc::clone(node)); + } + } + } + + fn remove_tail(&mut self) -> Option>> { + if let Some(tail) = self.tail.as_ref().map(|a| a.clone()) { + if let Some(tail_next) = tail.borrow().next.as_ref() { + tail_next.borrow_mut().prev = None; + self.tail = Some(Rc::clone(tail_next)); + } + tail.borrow_mut().next = None; + tail.borrow_mut().prev = None; + return Some(tail); + } + None + } +} + +impl LRUCache { + fn new(capacity: i32) -> Self { + Self { + map: HashMap::new(), + list: LinkedList::new(), + size: 0, + capacity, + } + } + + fn get(&mut self, key: i32) -> i32 { + if let Some(node) = self.map.get(&key) { + self.list.move_to_head(node); + return node.borrow().value; + } else { + return -1; + } + } + + fn put(&mut self, key: i32, value: i32) { + if let Some(node) = self.map.get(&key) { + self.list.move_to_head(node); + node.borrow_mut().value = value; + } else { + // remove tail node if needed + if self.size >= self.capacity { + if let Some(prev_tail) = self.list.remove_tail() { + self.map.remove(&prev_tail.borrow().key); + }; + } + // add node to list head + let node = Rc::new(RefCell::new(Node { + prev: None, + next: None, + key, + value, + })); + self.list.push_front(&node); + // update hashmap + self.map.insert(key, node); + // update size + self.size += 1; + } + } +} + +/** + * Your LRUCache object will be instantiated and called as such: + * let obj = LRUCache::new(capacity); + * let ret_1: i32 = obj.get(key); + * obj.put(key, value); + */ diff --git a/src/main/rust/g0101_0200/s0146_lru_cache/readme.md b/src/main/rust/g0101_0200/s0146_lru_cache/readme.md new file mode 100644 index 0000000..78ae6bf --- /dev/null +++ b/src/main/rust/g0101_0200/s0146_lru_cache/readme.md @@ -0,0 +1,48 @@ +146\. LRU Cache + +Medium + +Design a data structure that follows the constraints of a **[Least Recently Used (LRU) cache](https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU)**. + +Implement the `LRUCache` class: + +* `LRUCache(int capacity)` Initialize the LRU cache with **positive** size `capacity`. +* `int get(int key)` Return the value of the `key` if the key exists, otherwise return `-1`. +* `void put(int key, int value)` Update the value of the `key` if the `key` exists. Otherwise, add the `key-value` pair to the cache. If the number of keys exceeds the `capacity` from this operation, **evict** the least recently used key. + +The functions `get` and `put` must each run in `O(1)` average time complexity. + +**Example 1:** + +**Input** ["LRUCache", "put", "put", "get", "put", "get", "put", "get", "get", "get"] [[2], [1, 1], [2, 2], [1], [3, 3], [2], [4, 4], [1], [3], [4]] + +**Output:** [null, null, null, 1, null, -1, null, -1, 3, 4] + +**Explanation:** + +LRUCache lRUCache = new LRUCache(2); + +lRUCache.put(1, 1); // cache is {1=1} + +lRUCache.put(2, 2); // cache is {1=1, 2=2} + +lRUCache.get(1); // return 1 + +lRUCache.put(3, 3); // LRU key was 2, evicts key 2, cache is {1=1, 3=3} + +lRUCache.get(2); // returns -1 (not found) + +lRUCache.put(4, 4); // LRU key was 1, evicts key 1, cache is {4=4, 3=3} + +lRUCache.get(1); // return -1 (not found) + +lRUCache.get(3); // return 3 + +lRUCache.get(4); // return 4 + +**Constraints:** + +* `1 <= capacity <= 3000` +* 0 <= key <= 104 +* 0 <= value <= 105 +* At most 2 * 105 calls will be made to `get` and `put`. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0148_sort_list/Solution.rs b/src/main/rust/g0101_0200/s0148_sort_list/Solution.rs new file mode 100644 index 0000000..58f6b2f --- /dev/null +++ b/src/main/rust/g0101_0200/s0148_sort_list/Solution.rs @@ -0,0 +1,19 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Sorting #Two_Pointers #Linked_List +// #Divide_and_Conquer #Merge_Sort #Level_2_Day_4_Linked_List #Big_O_Time_O(log(N))_Space_O(log(N)) +// #2024_09_09_Time_21_ms_(81.82%)_Space_6.3_MB_(22.73%) + +impl Solution { + pub fn sort_list(mut head: Option>) -> Option> { + let mut vec: Vec = vec![]; + while let Some(mut node) = head { + vec.push(node.val); + head = node.next; + } + vec.sort(); + let mut next = None; + while let Some(val) = vec.pop() { + next = Some(Box::new(ListNode{next, val})) + } + next + } +} diff --git a/src/main/rust/g0101_0200/s0148_sort_list/readme.md b/src/main/rust/g0101_0200/s0148_sort_list/readme.md new file mode 100644 index 0000000..f74ab4a --- /dev/null +++ b/src/main/rust/g0101_0200/s0148_sort_list/readme.md @@ -0,0 +1,34 @@ +148\. Sort List + +Medium + +Given the `head` of a linked list, return _the list after sorting it in **ascending order**_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/09/14/sort_list_1.jpg) + +**Input:** head = [4,2,1,3] + +**Output:** [1,2,3,4] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/09/14/sort_list_2.jpg) + +**Input:** head = [-1,5,3,4,0] + +**Output:** [-1,0,3,4,5] + +**Example 3:** + +**Input:** head = [] + +**Output:** [] + +**Constraints:** + +* The number of nodes in the list is in the range [0, 5 * 104]. +* -105 <= Node.val <= 105 + +**Follow up:** Can you sort the linked list in `O(n logn)` time and `O(1)` memory (i.e. constant space)? \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0152_maximum_product_subarray/Solution.rs b/src/main/rust/g0101_0200/s0152_maximum_product_subarray/Solution.rs new file mode 100644 index 0000000..d4ba298 --- /dev/null +++ b/src/main/rust/g0101_0200/s0152_maximum_product_subarray/Solution.rs @@ -0,0 +1,17 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming +// #Dynamic_Programming_I_Day_6 #Level_2_Day_13_Dynamic_Programming #Udemy_Dynamic_Programming +// #Big_O_Time_O(N)_Space_O(1) #2024_09_09_Time_1_ms_(71.23%)_Space_2.2_MB_(53.42%) + +impl Solution { + pub fn max_product(nums: Vec) -> i32 { + nums.into_iter() + .fold((1f64, 1f64, f64::MIN), + |(prod1, prod2, res), x| { + let prod1 = prod1 * x as f64; + let prod2 = prod2 * x as f64; + ((x as f64).max(prod1).max(prod2), + (x as f64).min(prod1).min(prod2), + res.max(x as f64).max(prod1).max(prod2)) + }).2 as i32 + } +} diff --git a/src/main/rust/g0101_0200/s0152_maximum_product_subarray/readme.md b/src/main/rust/g0101_0200/s0152_maximum_product_subarray/readme.md new file mode 100644 index 0000000..05ec76b --- /dev/null +++ b/src/main/rust/g0101_0200/s0152_maximum_product_subarray/readme.md @@ -0,0 +1,31 @@ +152\. Maximum Product Subarray + +Medium + +Given an integer array `nums`, find a contiguous non-empty subarray within the array that has the largest product, and return _the product_. + +The test cases are generated so that the answer will fit in a **32-bit** integer. + +A **subarray** is a contiguous subsequence of the array. + +**Example 1:** + +**Input:** nums = [2,3,-2,4] + +**Output:** 6 + +**Explanation:** [2,3] has the largest product 6. + +**Example 2:** + +**Input:** nums = [-2,0,-1] + +**Output:** 0 + +**Explanation:** The result cannot be 2, because [-2,-1] is not a subarray. + +**Constraints:** + +* 1 <= nums.length <= 2 * 104 +* `-10 <= nums[i] <= 10` +* The product of any prefix or suffix of `nums` is **guaranteed** to fit in a **32-bit** integer. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/Solution.rs b/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/Solution.rs new file mode 100644 index 0000000..65acbb8 --- /dev/null +++ b/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/Solution.rs @@ -0,0 +1,25 @@ +// #Medium #Top_100_Liked_Questions #Array #Binary_Search #Algorithm_II_Day_2_Binary_Search +// #Binary_Search_I_Day_12 #Udemy_Binary_Search #Big_O_Time_O(log_N)_Space_O(log_N) +// #2024_09_09_Time_1_ms_(77.10%)_Space_2.1_MB_(96.95%) + +impl Solution { + pub fn find_min(nums: Vec) -> i32 { + let mut left:isize = 0; + let mut right:isize = nums.len() as isize - 1; + + while left + 1 < right { + let mid = left + (right - left) / 2; + if nums[mid as usize] < nums[right as usize] { + right = mid; + } else { + left = mid; + } + } + + if nums[left as usize] < nums[right as usize] { + nums[left as usize] + } else { + nums[right as usize] + } + } +} diff --git a/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/readme.md b/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/readme.md new file mode 100644 index 0000000..7d2ec20 --- /dev/null +++ b/src/main/rust/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/readme.md @@ -0,0 +1,46 @@ +153\. Find Minimum in Rotated Sorted Array + +Medium + +Suppose an array of length `n` sorted in ascending order is **rotated** between `1` and `n` times. For example, the array `nums = [0,1,2,4,5,6,7]` might become: + +* `[4,5,6,7,0,1,2]` if it was rotated `4` times. +* `[0,1,2,4,5,6,7]` if it was rotated `7` times. + +Notice that **rotating** an array `[a[0], a[1], a[2], ..., a[n-1]]` 1 time results in the array `[a[n-1], a[0], a[1], a[2], ..., a[n-2]]`. + +Given the sorted rotated array `nums` of **unique** elements, return _the minimum element of this array_. + +You must write an algorithm that runs in `O(log n) time.` + +**Example 1:** + +**Input:** nums = [3,4,5,1,2] + +**Output:** 1 + +**Explanation:** The original array was [1,2,3,4,5] rotated 3 times. + +**Example 2:** + +**Input:** nums = [4,5,6,7,0,1,2] + +**Output:** 0 + +**Explanation:** The original array was [0,1,2,4,5,6,7] and it was rotated 4 times. + +**Example 3:** + +**Input:** nums = [11,13,15,17] + +**Output:** 11 + +**Explanation:** The original array was [11,13,15,17] and it was rotated 4 times. + +**Constraints:** + +* `n == nums.length` +* `1 <= n <= 5000` +* `-5000 <= nums[i] <= 5000` +* All the integers of `nums` are **unique**. +* `nums` is sorted and rotated between `1` and `n` times. \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0155_min_stack/MinStack.rs b/src/main/rust/g0101_0200/s0155_min_stack/MinStack.rs new file mode 100644 index 0000000..8509cb1 --- /dev/null +++ b/src/main/rust/g0101_0200/s0155_min_stack/MinStack.rs @@ -0,0 +1,77 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Stack #Design +// #Data_Structure_II_Day_14_Stack_Queue #Programming_Skills_II_Day_18 #Level_2_Day_16_Design +// #Udemy_Design #Big_O_Time_O(1)_Space_O(N) #2024_09_10_Time_0_ms_(100.00%)_Space_5.9_MB_(71.62%) + +pub struct MinStack { + current_node: Option>, +} + +/** + * `&self` means the method takes an immutable reference. + * If you need a mutable reference, change it to `&mut self` instead. + */ +struct Node { + min: i32, + data: i32, + next_node: Option>, + previous_node: Option>, +} + +impl Node { + fn new(min: i32, data: i32, previous_node: Option>, next_node: Option>) -> Self { + Node { + min, + data, + next_node, + previous_node, + } + } +} + +impl MinStack { + pub fn new() -> Self { + MinStack { current_node: None } + } + + pub fn push(&mut self, val: i32) { + match &self.current_node { + None => { + self.current_node = Some(Box::new(Node::new(val, val, None, None))); + } + Some(current) => { + let min = std::cmp::min(current.min, val); + let previous_node = self.current_node.take(); + self.current_node = Some(Box::new(Node::new(min, val, previous_node, None))); + } + } + } + + pub fn pop(&mut self) { + if let Some(current) = self.current_node.take() { + self.current_node = current.previous_node; + } + } + + pub fn top(&self) -> i32 { + if let Some(current) = &self.current_node { + return current.data; + } + panic!("Stack is empty!"); + } + + pub fn get_min(&self) -> i32 { + if let Some(current) = &self.current_node { + return current.min; + } + panic!("Stack is empty!"); + } +} + +/** + * Your MinStack object will be instantiated and called as such: + * let obj = MinStack::new(); + * obj.push(val); + * obj.pop(); + * let ret_3: i32 = obj.top(); + * let ret_4: i32 = obj.get_min(); + */ diff --git a/src/main/rust/g0101_0200/s0155_min_stack/readme.md b/src/main/rust/g0101_0200/s0155_min_stack/readme.md new file mode 100644 index 0000000..bf9a659 --- /dev/null +++ b/src/main/rust/g0101_0200/s0155_min_stack/readme.md @@ -0,0 +1,39 @@ +155\. Min Stack + +Easy + +Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. + +Implement the `MinStack` class: + +* `MinStack()` initializes the stack object. +* `void push(int val)` pushes the element `val` onto the stack. +* `void pop()` removes the element on the top of the stack. +* `int top()` gets the top element of the stack. +* `int getMin()` retrieves the minimum element in the stack. + +**Example 1:** + +**Input** + + ["MinStack","push","push","push","getMin","pop","top","getMin"] + [[],[-2],[0],[-3],[],[],[],[]] + +**Output:** [null,null,null,null,-3,null,0,-2] + +**Explanation:** + + MinStack minStack = new MinStack(); + minStack.push(-2); + minStack.push(0); + minStack.push(-3); + minStack.getMin(); // return -3 + minStack.pop(); + minStack.top(); // return 0 + minStack.getMin(); // return -2 + +**Constraints:** + +* -231 <= val <= 231 - 1 +* Methods `pop`, `top` and `getMin` operations will always be called on **non-empty** stacks. +* At most 3 * 104 calls will be made to `push`, `pop`, `top`, and `getMin`. diff --git a/src/main/rust/g0101_0200/s0169_majority_element/Solution.rs b/src/main/rust/g0101_0200/s0169_majority_element/Solution.rs new file mode 100644 index 0000000..ee14b5a --- /dev/null +++ b/src/main/rust/g0101_0200/s0169_majority_element/Solution.rs @@ -0,0 +1,37 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Sorting #Counting +// #Divide_and_Conquer #Data_Structure_II_Day_1_Array #Udemy_Famous_Algorithm +// #Big_O_Time_O(n)_Space_O(1) #2024_09_10_Time_1_ms_(82.64%)_Space_2.5_MB_(18.91%) + +impl Solution { + pub fn majority_element(arr: Vec) -> i32 { + let mut count = 1; + let mut majority = arr[0]; + + // For Potential Majority Element + for &num in arr.iter().skip(1) { + if num == majority { + count += 1; + } else { + if count > 1 { + count -= 1; + } else { + majority = num; + } + } + } + + // For Confirmation + count = 0; + for &num in arr.iter() { + if num == majority { + count += 1; + } + } + + if count >= (arr.len() / 2) + 1 { + majority + } else { + -1 + } + } +} diff --git a/src/main/rust/g0101_0200/s0169_majority_element/readme.md b/src/main/rust/g0101_0200/s0169_majority_element/readme.md new file mode 100644 index 0000000..92112ba --- /dev/null +++ b/src/main/rust/g0101_0200/s0169_majority_element/readme.md @@ -0,0 +1,27 @@ +169\. Majority Element + +Easy + +Given an array `nums` of size `n`, return _the majority element_. + +The majority element is the element that appears more than `⌊n / 2⌋` times. You may assume that the majority element always exists in the array. + +**Example 1:** + +**Input:** nums = [3,2,3] + +**Output:** 3 + +**Example 2:** + +**Input:** nums = [2,2,1,1,1,2,2] + +**Output:** 2 + +**Constraints:** + +* `n == nums.length` +* 1 <= n <= 5 * 104 +* -109 <= nums[i] <= 109 + +**Follow-up:** Could you solve the problem in linear time and in `O(1)` space? \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0189_rotate_array/Solution.rs b/src/main/rust/g0101_0200/s0189_rotate_array/Solution.rs new file mode 100644 index 0000000..7e2c4eb --- /dev/null +++ b/src/main/rust/g0101_0200/s0189_rotate_array/Solution.rs @@ -0,0 +1,18 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Math #Two_Pointers +// #Algorithm_I_Day_2_Two_Pointers #Udemy_Arrays #Big_O_Time_O(n)_Space_O(1) +// #2024_09_10_Time_3_ms_(96.69%)_Space_3.6_MB_(76.46%) + +impl Solution { + pub fn rotate(nums: &mut Vec, k: i32) { + let mut rotated = vec![0; nums.len()]; + let k_fixed = k as usize % nums.len(); + + for (i, item) in nums.iter().enumerate() { + match nums.get(i+k_fixed) { + Some(n) => rotated[i+k_fixed] = *item, + None => rotated[(i+k_fixed)-nums.len()] = *item, + } + } + nums.copy_from_slice(&rotated) + } +} diff --git a/src/main/rust/g0101_0200/s0189_rotate_array/readme.md b/src/main/rust/g0101_0200/s0189_rotate_array/readme.md new file mode 100644 index 0000000..194f1ed --- /dev/null +++ b/src/main/rust/g0101_0200/s0189_rotate_array/readme.md @@ -0,0 +1,42 @@ +189\. Rotate Array + +Medium + +Given an array, rotate the array to the right by `k` steps, where `k` is non-negative. + +**Example 1:** + +**Input:** nums = [1,2,3,4,5,6,7], k = 3 + +**Output:** [5,6,7,1,2,3,4] + +**Explanation:** + +rotate 1 steps to the right: [7,1,2,3,4,5,6] + +rotate 2 steps to the right: [6,7,1,2,3,4,5] + +rotate 3 steps to the right: [5,6,7,1,2,3,4] + +**Example 2:** + +**Input:** nums = [-1,-100,3,99], k = 2 + +**Output:** [3,99,-1,-100] + +**Explanation:** + +rotate 1 steps to the right: [99,-1,-100,3] + +rotate 2 steps to the right: [3,99,-1,-100] + +**Constraints:** + +* 1 <= nums.length <= 105 +* -231 <= nums[i] <= 231 - 1 +* 0 <= k <= 105 + +**Follow up:** + +* Try to come up with as many solutions as you can. There are at least **three** different ways to solve this problem. +* Could you do it in-place with `O(1)` extra space? \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0198_house_robber/Solution.rs b/src/main/rust/g0101_0200/s0198_house_robber/Solution.rs new file mode 100644 index 0000000..6c84464 --- /dev/null +++ b/src/main/rust/g0101_0200/s0198_house_robber/Solution.rs @@ -0,0 +1,28 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming +// #Algorithm_I_Day_12_Dynamic_Programming #Dynamic_Programming_I_Day_3 +// #Level_2_Day_12_Dynamic_Programming #Udemy_Dynamic_Programming #Big_O_Time_O(n)_Space_O(n) +// #2024_09_10_Time_0_ms_(100.00%)_Space_2.1_MB_(31.95%) + +impl Solution { + pub fn rob(nums: Vec) -> i32 { + if nums.is_empty() { + return 0; + } + if nums.len() == 1 { + return nums[0]; + } + if nums.len() == 2 { + return std::cmp::max(nums[0], nums[1]); + } + + let mut profit = vec![0; nums.len()]; + profit[0] = nums[0]; + profit[1] = std::cmp::max(nums[0], nums[1]); + + for i in 2..nums.len() { + profit[i] = std::cmp::max(profit[i - 1], nums[i] + profit[i - 2]); + } + + profit[nums.len() - 1] + } +} diff --git a/src/main/rust/g0101_0200/s0198_house_robber/readme.md b/src/main/rust/g0101_0200/s0198_house_robber/readme.md new file mode 100644 index 0000000..cb31c70 --- /dev/null +++ b/src/main/rust/g0101_0200/s0198_house_robber/readme.md @@ -0,0 +1,28 @@ +198\. House Robber + +Medium + +You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and **it will automatically contact the police if two adjacent houses were broken into on the same night**. + +Given an integer array `nums` representing the amount of money of each house, return _the maximum amount of money you can rob tonight **without alerting the police**_. + +**Example 1:** + +**Input:** nums = [1,2,3,1] + +**Output:** 4 + +**Explanation:** Rob house 1 (money = 1) and then rob house 3 (money = 3). Total amount you can rob = 1 + 3 = 4. + +**Example 2:** + +**Input:** nums = [2,7,9,3,1] + +**Output:** 12 + +**Explanation:** Rob house 1 (money = 2), rob house 3 (money = 9) and rob house 5 (money = 1). Total amount you can rob = 2 + 9 + 1 = 12. + +**Constraints:** + +* `1 <= nums.length <= 100` +* `0 <= nums[i] <= 400` \ No newline at end of file diff --git a/src/main/rust/g0101_0200/s0200_number_of_islands/Solution.rs b/src/main/rust/g0101_0200/s0200_number_of_islands/Solution.rs new file mode 100644 index 0000000..5ae54e0 --- /dev/null +++ b/src/main/rust/g0101_0200/s0200_number_of_islands/Solution.rs @@ -0,0 +1,59 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Depth_First_Search +// #Breadth_First_Search #Matrix #Union_Find +// #Algorithm_II_Day_6_Breadth_First_Search_Depth_First_Search +// #Graph_Theory_I_Day_1_Matrix_Related_Problems #Level_1_Day_9_Graph/BFS/DFS #Udemy_Graph +// #Big_O_Time_O(M*N)_Space_O(M*N) #2024_09_10_Time_7_ms_(86.79%)_Space_9.1_MB_(42.14%) + +impl Solution { + pub fn num_islands(grid: Vec>) -> i32 { + let mut num_of_islands: i32 = 0; + let mut current_index: i32 = 1; + let height = grid.len(); + let width = grid[0].len(); + let mut part_of_island = vec![0; width * height]; + let mut pos; + + for current in 0..height * width { + let x = current / width; + let y = current % width; + + if grid[x][y] == '1' { + let left = if y > 0 { + part_of_island[current - 1] + } else { + 0 + }; + + let up = if x > 0 { + part_of_island[current - width] + } else { + 0 + }; + + if up > 1 { + if left > 1 && left != up { + for i in 0..width { + pos = part_of_island[current - i]; + if pos == left { + part_of_island[current - i] = up; + } + } + num_of_islands -= 1; + } + part_of_island[current] = up; + continue; + } else if left > 1 { + part_of_island[current] = left; + continue; + } + + current_index += 1; + num_of_islands += 1; + part_of_island[current] = current_index; + } + } + + num_of_islands + } +} + diff --git a/src/main/rust/g0101_0200/s0200_number_of_islands/readme.md b/src/main/rust/g0101_0200/s0200_number_of_islands/readme.md new file mode 100644 index 0000000..1e26360 --- /dev/null +++ b/src/main/rust/g0101_0200/s0200_number_of_islands/readme.md @@ -0,0 +1,46 @@ +200\. Number of Islands + +Medium + +Given an `m x n` 2D binary grid `grid` which represents a map of `'1'`s (land) and `'0'`s (water), return _the number of islands_. + +An **island** is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. + +**Example 1:** + +**Input:** grid = [ + +["1","1","1","1","0"], + +["1","1","0","1","0"], + +["1","1","0","0","0"], + +["0","0","0","0","0"] + +] + +**Output:** 1 + +**Example 2:** + +**Input:** grid = [ + +["1","1","0","0","0"], + +["1","1","0","0","0"], + +["0","0","1","0","0"], + +["0","0","0","1","1"] + +] + +**Output:** 3 + +**Constraints:** + +* `m == grid.length` +* `n == grid[i].length` +* `1 <= m, n <= 300` +* `grid[i][j]` is `'0'` or `'1'`. \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0206_reverse_linked_list/Solution.rs b/src/main/rust/g0201_0300/s0206_reverse_linked_list/Solution.rs new file mode 100644 index 0000000..d71232a --- /dev/null +++ b/src/main/rust/g0201_0300/s0206_reverse_linked_list/Solution.rs @@ -0,0 +1,35 @@ +// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Linked_List #Recursion +// #Data_Structure_I_Day_8_Linked_List #Algorithm_I_Day_10_Recursion_Backtracking +// #Level_1_Day_3_Linked_List #Udemy_Linked_List #Big_O_Time_O(N)_Space_O(1) +// #2024_09_10_Time_0_ms_(100.00%)_Space_2.5_MB_(14.14%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn reverse_list(mut head: Option>) -> Option> { + let mut prev: Option> = None; + let mut curr = head; + + while let Some(mut node) = curr { + curr = node.next.take(); // Move the next node to curr + node.next = prev; // Reverse the current node's next pointer + prev = Some(node); // Move prev forward to the current node + } + + prev + } +} diff --git a/src/main/rust/g0201_0300/s0206_reverse_linked_list/readme.md b/src/main/rust/g0201_0300/s0206_reverse_linked_list/readme.md new file mode 100644 index 0000000..64e1fcc --- /dev/null +++ b/src/main/rust/g0201_0300/s0206_reverse_linked_list/readme.md @@ -0,0 +1,34 @@ +206\. Reverse Linked List + +Easy + +Given the `head` of a singly linked list, reverse the list, and return _the reversed list_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg) + +**Input:** head = [1,2,3,4,5] + +**Output:** [5,4,3,2,1] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/02/19/rev1ex2.jpg) + +**Input:** head = [1,2] + +**Output:** [2,1] + +**Example 3:** + +**Input:** head = [] + +**Output:** [] + +**Constraints:** + +* The number of nodes in the list is the range `[0, 5000]`. +* `-5000 <= Node.val <= 5000` + +**Follow up:** A linked list can be reversed either iteratively or recursively. Could you implement both? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0207_course_schedule/Solution.rs b/src/main/rust/g0201_0300/s0207_course_schedule/Solution.rs new file mode 100644 index 0000000..af210a8 --- /dev/null +++ b/src/main/rust/g0201_0300/s0207_course_schedule/Solution.rs @@ -0,0 +1,48 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Depth_First_Search +// #Breadth_First_Search #Graph #Topological_Sort #Big_O_Time_O(N)_Space_O(N) +// #2024_09_10_Time_0_ms_(100.00%)_Space_2.6_MB_(47.48%) + +impl Solution { + const WHITE: i32 = 0; + const GRAY: i32 = 1; + const BLACK: i32 = 2; + + pub fn can_finish(num_courses: i32, prerequisites: Vec>) -> bool { + let num_courses = num_courses as usize; + let mut adj: Vec> = vec![vec![]; num_courses]; + let mut colors: Vec = vec![Self::WHITE; num_courses]; + + for pre in prerequisites.iter() { + adj[pre[1] as usize].push(pre[0]); + } + + for i in 0..num_courses { + if colors[i] == Self::WHITE && !adj[i].is_empty() { + if Self::has_cycle(&adj, i, &mut colors) { + return false; + } + } + } + + true + } + + fn has_cycle(adj: &Vec>, node: usize, colors: &mut Vec) -> bool { + colors[node] = Self::GRAY; + + for &neighbor in adj[node].iter() { + let neighbor = neighbor as usize; + if colors[neighbor] == Self::GRAY { + return true; + } + if colors[neighbor] == Self::WHITE { + if Self::has_cycle(adj, neighbor, colors) { + return true; + } + } + } + + colors[node] = Self::BLACK; + false + } +} diff --git a/src/main/rust/g0201_0300/s0207_course_schedule/readme.md b/src/main/rust/g0201_0300/s0207_course_schedule/readme.md new file mode 100644 index 0000000..97ba585 --- /dev/null +++ b/src/main/rust/g0201_0300/s0207_course_schedule/readme.md @@ -0,0 +1,33 @@ +207\. Course Schedule + +Medium + +There are a total of `numCourses` courses you have to take, labeled from `0` to `numCourses - 1`. You are given an array `prerequisites` where prerequisites[i] = [ai, bi] indicates that you **must** take course bi first if you want to take course ai. + +* For example, the pair `[0, 1]`, indicates that to take course `0` you have to first take course `1`. + +Return `true` if you can finish all courses. Otherwise, return `false`. + +**Example 1:** + +**Input:** numCourses = 2, prerequisites = [[1,0]] + +**Output:** true + +**Explanation:** There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. + +**Example 2:** + +**Input:** numCourses = 2, prerequisites = [[1,0],[0,1]] + +**Output:** false + +**Explanation:** There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. + +**Constraints:** + +* `1 <= numCourses <= 2000` +* `0 <= prerequisites.length <= 5000` +* `prerequisites[i].length == 2` +* 0 <= ai, bi < numCourses +* All the pairs prerequisites[i] are **unique**. \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/Trie.rs b/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/Trie.rs new file mode 100644 index 0000000..24160de --- /dev/null +++ b/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/Trie.rs @@ -0,0 +1,47 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Design #Trie +// #Level_2_Day_16_Design #Udemy_Trie_and_Heap +// #Big_O_Time_O(word.length())_or_O(prefix.length())_Space_O(N) +// #2024_09_10_Time_13_ms_(90.59%)_Space_9_MB_(97.65%) + +use std::collections::HashMap; + +struct Trie { + tree: HashMap> +} + +/** + * `&self` means the method takes an immutable reference + * If you need a mutable reference, change it to `&mut self` instead. + */ +impl Trie { + + fn new() -> Self { + Trie{tree:HashMap::new()} + } + + fn insert(&mut self, word: String) { + self.tree.entry(word.chars().next().unwrap()).or_default().push(word); + } + + fn search(&self, word: String) -> bool { + if let Some(vals) = self.tree.get(&word.chars().next().unwrap()) { + return vals.contains(&word) + } + false + } + + fn starts_with(&self, prefix: String) -> bool { + if let Some(vals) = self.tree.get(&prefix.chars().next().unwrap()) { + return vals.iter().any(|word| word.starts_with(&prefix)) + } + false + } +} + +/** + * Your Trie object will be instantiated and called as such: + * let obj = Trie::new(); + * obj.insert(word); + * let ret_2: bool = obj.search(word); + * let ret_3: bool = obj.starts_with(prefix); + */ diff --git a/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/readme.md b/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/readme.md new file mode 100644 index 0000000..80736aa --- /dev/null +++ b/src/main/rust/g0201_0300/s0208_implement_trie_prefix_tree/readme.md @@ -0,0 +1,40 @@ +208\. Implement Trie (Prefix Tree) + +Medium + +A [**trie**](https://en.wikipedia.org/wiki/Trie) (pronounced as "try") or **prefix tree** is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker. + +Implement the Trie class: + +* `Trie()` Initializes the trie object. +* `void insert(String word)` Inserts the string `word` into the trie. +* `boolean search(String word)` Returns `true` if the string `word` is in the trie (i.e., was inserted before), and `false` otherwise. +* `boolean startsWith(String prefix)` Returns `true` if there is a previously inserted string `word` that has the prefix `prefix`, and `false` otherwise. + +**Example 1:** + +**Input** ["Trie", "insert", "search", "search", "startsWith", "insert", "search"] [[], ["apple"], ["apple"], ["app"], ["app"], ["app"], ["app"]] + +**Output:** [null, null, true, false, true, null, true] + +**Explanation:** + +Trie trie = new Trie(); + +trie.insert("apple"); + +trie.search("apple"); // return True + +trie.search("app"); // return False + +trie.startsWith("app"); // return True + +trie.insert("app"); + +trie.search("app"); // return True + +**Constraints:** + +* `1 <= word.length, prefix.length <= 2000` +* `word` and `prefix` consist only of lowercase English letters. +* At most 3 * 104 calls **in total** will be made to `insert`, `search`, and `startsWith`. \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/Solution.rs b/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/Solution.rs new file mode 100644 index 0000000..d6e19f6 --- /dev/null +++ b/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/Solution.rs @@ -0,0 +1,23 @@ +// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Sorting #Heap_Priority_Queue +// #Divide_and_Conquer #Quickselect #Data_Structure_II_Day_20_Heap_Priority_Queue +// #Big_O_Time_O(n*log(n))_Space_O(log(n)) #2024_09_10_Time_10_ms_(90.24%)_Space_3.2_MB_(22.76%) + +impl Solution { + pub fn find_kth_largest(nums: Vec, mut k: i32) -> i32 { + const NEGATIVE_OFFSET: usize = 10_000; + + let mut freq_array = [0; 20_001]; + for n in nums { + freq_array[n as usize + NEGATIVE_OFFSET] += 1; + } + + for i in (0..freq_array.len()).rev() { + k -= freq_array[i]; + if k <= 0 { + return (i - NEGATIVE_OFFSET) as i32; + } + } + + 0 + } +} diff --git a/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/readme.md b/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/readme.md new file mode 100644 index 0000000..79f59a3 --- /dev/null +++ b/src/main/rust/g0201_0300/s0215_kth_largest_element_in_an_array/readme.md @@ -0,0 +1,26 @@ +215\. Kth Largest Element in an Array + +Medium + +Given an integer array `nums` and an integer `k`, return _the_ kth _largest element in the array_. + +Note that it is the kth largest element in the sorted order, not the kth distinct element. + +You must solve it in `O(n)` time complexity. + +**Example 1:** + +**Input:** nums = [3,2,1,5,6,4], k = 2 + +**Output:** 5 + +**Example 2:** + +**Input:** nums = [3,2,3,1,2,4,5,5,6], k = 4 + +**Output:** 4 + +**Constraints:** + +* 1 <= k <= nums.length <= 105 +* -104 <= nums[i] <= 104 \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0221_maximal_square/Solution.rs b/src/main/rust/g0201_0300/s0221_maximal_square/Solution.rs new file mode 100644 index 0000000..6e6b7fd --- /dev/null +++ b/src/main/rust/g0201_0300/s0221_maximal_square/Solution.rs @@ -0,0 +1,32 @@ +// #Medium #Array #Dynamic_Programming #Matrix #Dynamic_Programming_I_Day_16 +// #Big_O_Time_O(m*n)_Space_O(m*n) #2024_09_10_Time_16_ms_(88.89%)_Space_9.3_MB_(81.48%) + +impl Solution { + pub fn maximal_square(matrix: Vec>) -> i32 { + let m = matrix.len(); + if m == 0 { + return 0; + } + let n = matrix[0].len(); + if n == 0 { + return 0; + } + + // Create a 2D dp vector initialized to 0 + let mut dp = vec![vec![0; n + 1]; m + 1]; + let mut max_side = 0; + + for i in 0..m { + for j in 0..n { + if matrix[i][j] == '1' { + // Calculate the size of the square ending at (i, j) + dp[i + 1][j + 1] = 1 + dp[i][j].min(dp[i + 1][j]).min(dp[i][j + 1]); + max_side = max_side.max(dp[i + 1][j + 1]); + } + } + } + + // Return the area of the largest square + (max_side * max_side) as i32 + } +} diff --git a/src/main/rust/g0201_0300/s0221_maximal_square/readme.md b/src/main/rust/g0201_0300/s0221_maximal_square/readme.md new file mode 100644 index 0000000..f3cfa55 --- /dev/null +++ b/src/main/rust/g0201_0300/s0221_maximal_square/readme.md @@ -0,0 +1,34 @@ +221\. Maximal Square + +Medium + +Given an `m x n` binary `matrix` filled with `0`'s and `1`'s, _find the largest square containing only_ `1`'s _and return its area_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/26/max1grid.jpg) + +**Input:** matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]] + +**Output:** 4 + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/11/26/max2grid.jpg) + +**Input:** matrix = [["0","1"],["1","0"]] + +**Output:** 1 + +**Example 3:** + +**Input:** matrix = [["0"]] + +**Output:** 0 + +**Constraints:** + +* `m == matrix.length` +* `n == matrix[i].length` +* `1 <= m, n <= 300` +* `matrix[i][j]` is `'0'` or `'1'`. \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0226_invert_binary_tree/Solution.rs b/src/main/rust/g0201_0300/s0226_invert_binary_tree/Solution.rs new file mode 100644 index 0000000..4c1617e --- /dev/null +++ b/src/main/rust/g0201_0300/s0226_invert_binary_tree/Solution.rs @@ -0,0 +1,36 @@ +// #Easy #Top_100_Liked_Questions #Depth_First_Search #Breadth_First_Search #Tree #Binary_Tree +// #Data_Structure_I_Day_12_Tree #Level_2_Day_6_Tree #Udemy_Tree_Stack_Queue +// #Big_O_Time_O(n)_Space_O(n) #2024_09_11_Time_0_ms_(100.00%)_Space_2_MB_(77.66%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn invert_tree(root: Option>>) -> Option>> { + root.map(|node| { + let node = node.borrow(); + let mut new_node = TreeNode::new(node.val); + new_node.left = Self::invert_tree(node.right.clone()); + new_node.right = Self::invert_tree(node.left.clone()); + Rc::new(RefCell::new(new_node)) + }) + + } +} diff --git a/src/main/rust/g0201_0300/s0226_invert_binary_tree/readme.md b/src/main/rust/g0201_0300/s0226_invert_binary_tree/readme.md new file mode 100644 index 0000000..ee4c593 --- /dev/null +++ b/src/main/rust/g0201_0300/s0226_invert_binary_tree/readme.md @@ -0,0 +1,32 @@ +226\. Invert Binary Tree + +Easy + +Given the `root` of a binary tree, invert the tree, and return _its root_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg) + +**Input:** root = [4,2,7,1,3,6,9] + +**Output:** [4,7,2,9,6,3,1] + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/03/14/invert2-tree.jpg) + +**Input:** root = [2,1,3] + +**Output:** [2,3,1] + +**Example 3:** + +**Input:** root = [] + +**Output:** [] + +**Constraints:** + +* The number of nodes in the tree is in the range `[0, 100]`. +* `-100 <= Node.val <= 100` \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/Solution.rs b/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/Solution.rs new file mode 100644 index 0000000..3126c33 --- /dev/null +++ b/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/Solution.rs @@ -0,0 +1,39 @@ +// #Medium #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree #Binary_Search_Tree +// #Data_Structure_II_Day_17_Tree #Level_2_Day_9_Binary_Search_Tree #Big_O_Time_O(n)_Space_O(n) +// #2024_09_11_Time_0_ms_(100.00%)_Space_3.1_MB_(15.07%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn kth_smallest(root: Option>>, k: i32) -> i32 { + let mut vec = vec![]; + Self::in_order(&root, &mut vec); + vec[k as usize - 1] + } + + pub fn in_order(root: &Option>>, vec: &mut Vec) { + if let Some(node) = root { + let _ = Self::in_order(&node.borrow().left, vec); + vec.push(node.borrow().val); + let _ = Self::in_order(&node.borrow().right, vec); + } + } +} diff --git a/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md b/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md new file mode 100644 index 0000000..0597f48 --- /dev/null +++ b/src/main/rust/g0201_0300/s0230_kth_smallest_element_in_a_bst/readme.md @@ -0,0 +1,29 @@ +230\. Kth Smallest Element in a BST + +Medium + +Given the `root` of a binary search tree, and an integer `k`, return _the_ kth _smallest value (**1-indexed**) of all the values of the nodes in the tree_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/01/28/kthtree1.jpg) + +**Input:** root = [3,1,4,null,2], k = 1 + +**Output:** 1 + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/01/28/kthtree2.jpg) + +**Input:** root = [5,3,6,2,4,null,null,1], k = 3 + +**Output:** 3 + +**Constraints:** + +* The number of nodes in the tree is `n`. +* 1 <= k <= n <= 104 +* 0 <= Node.val <= 104 + +**Follow up:** If the BST is modified often (i.e., we can do insert and delete operations) and you need to find the kth smallest frequently, how would you optimize? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0234_palindrome_linked_list/Solution.rs b/src/main/rust/g0201_0300/s0234_palindrome_linked_list/Solution.rs new file mode 100644 index 0000000..26c58cc --- /dev/null +++ b/src/main/rust/g0201_0300/s0234_palindrome_linked_list/Solution.rs @@ -0,0 +1,54 @@ +// #Easy #Top_100_Liked_Questions #Two_Pointers #Stack #Linked_List #Recursion +// #Level_2_Day_3_Linked_List #Udemy_Linked_List #Big_O_Time_O(n)_Space_O(1) +// #2024_09_11_Time_43_ms_(85.29%)_Space_9.2_MB_(34.31%) + +// Definition for singly-linked list. +// #[derive(PartialEq, Eq, Clone, Debug)] +// pub struct ListNode { +// pub val: i32, +// pub next: Option> +// } +// +// impl ListNode { +// #[inline] +// fn new(val: i32) -> Self { +// ListNode { +// next: None, +// val +// } +// } +// } +impl Solution { + pub fn is_palindrome(head: Option>) -> bool { + let mut ref_node = &head; + let mut len = 0; + + while let Some(ref node) = &ref_node { + ref_node = &node.next; + len += 1; + } + + ref_node = &head; + let mut i = 0; + let mut num = 0; + let mut skip_num = if len % 2 == 1 { len / 2 + 1 } else { 0 }; + + while let Some(node) = ref_node { + ref_node = &node.next; + + if skip_num > 0 && skip_num - 1 == i { + skip_num = 0; + continue; + } + + if i < len / 2 { + num = num * 10 + node.val as usize; + } else { + num -= node.val as usize * 10_usize.pow(i - len / 2); + } + i += 1; + } + + num == 0 + } +} diff --git a/src/main/rust/g0201_0300/s0234_palindrome_linked_list/readme.md b/src/main/rust/g0201_0300/s0234_palindrome_linked_list/readme.md new file mode 100644 index 0000000..a79cc88 --- /dev/null +++ b/src/main/rust/g0201_0300/s0234_palindrome_linked_list/readme.md @@ -0,0 +1,28 @@ +234\. Palindrome Linked List + +Easy + +Given the `head` of a singly linked list, return `true` _if it is a palindrome or_ `false` _otherwise_. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/03/03/pal1linked-list.jpg) + +**Input:** head = [1,2,2,1] + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2021/03/03/pal2linked-list.jpg) + +**Input:** head = [1,2] + +**Output:** false + +**Constraints:** + +* The number of nodes in the list is in the range [1, 105]. +* `0 <= Node.val <= 9` + +**Follow up:** Could you do it in `O(n)` time and `O(1)` space? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/Solution.rs b/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/Solution.rs new file mode 100644 index 0000000..a32904b --- /dev/null +++ b/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/Solution.rs @@ -0,0 +1,58 @@ +// #Medium #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree +// #Data_Structure_II_Day_18_Tree #Udemy_Tree_Stack_Queue #Big_O_Time_O(n)_Space_O(n) +// #2024_09_11_Time_0_ms_(100.00%)_Space_4.2_MB_(31.48%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +use std::collections::{HashMap, HashSet}; +impl Solution { + pub fn lowest_common_ancestor(root: Option>>, p: Option>>, q: Option>>) -> Option>> { + if let (Some(rn), Some(pn), Some(qn)) = (&root, &p, &q) { + + if rn.borrow().val == pn.borrow().val || rn.borrow().val == qn.borrow().val { + return root; + } + + let left = Self::lowest_common_ancestor( + rn.borrow().left.as_ref().map(Rc::clone), + Some(Rc::clone(pn)), + Some(Rc::clone(qn)), + ); + + let right = Self::lowest_common_ancestor( + rn.borrow().right.as_ref().map(Rc::clone), + Some(Rc::clone(pn)), + Some(Rc::clone(qn)), + ); + + if left.is_some() && right.is_some() { + return root; + } + + if left.is_some() { + return left; + } + + return right; + } + None + } +} diff --git a/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/readme.md b/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/readme.md new file mode 100644 index 0000000..764c2ba --- /dev/null +++ b/src/main/rust/g0201_0300/s0236_lowest_common_ancestor_of_a_binary_tree/readme.md @@ -0,0 +1,41 @@ +236\. Lowest Common Ancestor of a Binary Tree + +Medium + +Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. + +According to the [definition of LCA on Wikipedia](https://en.wikipedia.org/wiki/Lowest_common_ancestor): “The lowest common ancestor is defined between two nodes `p` and `q` as the lowest node in `T` that has both `p` and `q` as descendants (where we allow **a node to be a descendant of itself**).” + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2018/12/14/binarytree.png) + +**Input:** root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1 + +**Output:** 3 + +**Explanation:** The LCA of nodes 5 and 1 is 3. + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2018/12/14/binarytree.png) + +**Input:** root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4 + +**Output:** 5 + +**Explanation:** The LCA of nodes 5 and 4 is 5, since a node can be a descendant of itself according to the LCA definition. + +**Example 3:** + +**Input:** root = [1,2], p = 1, q = 2 + +**Output:** 1 + +**Constraints:** + +* The number of nodes in the tree is in the range [2, 105]. +* -109 <= Node.val <= 109 +* All `Node.val` are **unique**. +* `p != q` +* `p` and `q` will exist in the tree. \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0238_product_of_array_except_self/Solution.rs b/src/main/rust/g0201_0300/s0238_product_of_array_except_self/Solution.rs new file mode 100644 index 0000000..dff6ae6 --- /dev/null +++ b/src/main/rust/g0201_0300/s0238_product_of_array_except_self/Solution.rs @@ -0,0 +1,30 @@ +// #Medium #Top_100_Liked_Questions #Array #Prefix_Sum #Data_Structure_II_Day_5_Array #Udemy_Arrays +// #Big_O_Time_O(n^2)_Space_O(n) #2024_09_11_Time_8_ms_(87.13%)_Space_3.2_MB_(89.17%) + +impl Solution { + pub fn product_except_self(nums: Vec) -> Vec { + let mut res = Vec::new(); + let mut prev = nums[0]; + let n = nums.len(); + + // calc prefix + res.push(1); + for i in 1..n{ + let mut prod = 1; + prod *= prev; + prev *= nums[i]; + res.push(prod); + } + + // calc suffix + prev = nums[n - 1]; + for i in (0..n - 1).rev(){ + let mut prod = 1; + prod *= prev; + prev *= nums[i]; + res[i] *= prod; + } + + res + } +} diff --git a/src/main/rust/g0201_0300/s0238_product_of_array_except_self/readme.md b/src/main/rust/g0201_0300/s0238_product_of_array_except_self/readme.md new file mode 100644 index 0000000..32140bf --- /dev/null +++ b/src/main/rust/g0201_0300/s0238_product_of_array_except_self/readme.md @@ -0,0 +1,29 @@ +238\. Product of Array Except Self + +Medium + +Given an integer array `nums`, return _an array_ `answer` _such that_ `answer[i]` _is equal to the product of all the elements of_ `nums` _except_ `nums[i]`. + +The product of any prefix or suffix of `nums` is **guaranteed** to fit in a **32-bit** integer. + +You must write an algorithm that runs in `O(n)` time and without using the division operation. + +**Example 1:** + +**Input:** nums = [1,2,3,4] + +**Output:** [24,12,8,6] + +**Example 2:** + +**Input:** nums = [-1,1,0,-3,3] + +**Output:** [0,0,9,0,0] + +**Constraints:** + +* 2 <= nums.length <= 105 +* `-30 <= nums[i] <= 30` +* The product of any prefix or suffix of `nums` is **guaranteed** to fit in a **32-bit** integer. + +**Follow up:** Can you solve the problem in `O(1) `extra space complexity? (The output array **does not** count as extra space for space complexity analysis.) \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0239_sliding_window_maximum/Solution.rs b/src/main/rust/g0201_0300/s0239_sliding_window_maximum/Solution.rs new file mode 100644 index 0000000..9f8eb24 --- /dev/null +++ b/src/main/rust/g0201_0300/s0239_sliding_window_maximum/Solution.rs @@ -0,0 +1,68 @@ +// #Hard #Top_100_Liked_Questions #Array #Heap_Priority_Queue #Sliding_Window #Queue +// #Monotonic_Queue #Udemy_Arrays #Big_O_Time_O(n*k)_Space_O(n+k) +// #2024_09_11_Time_43_ms_(84.62%)_Space_3.7_MB_(48.72%) + +use std::collections::VecDeque; + +struct MaxQueue { + queue: VecDeque, +} + +impl MaxQueue { + fn new() -> Self { + Self { + queue: VecDeque::new(), + } + } + + fn enqueue(&mut self, element: i32) { + while !self.queue.is_empty() && *self.queue.back().unwrap() < element { + self.queue.pop_back(); + } + self.queue.push_back(element); + } + + fn dequeue(&mut self, removed_element: i32) -> i32 { + if !self.queue.is_empty() && *self.queue.front().unwrap() == removed_element { + self.queue.pop_front().unwrap() + } else { + removed_element + } + } + + // Get the maximum element in the queue + fn get_max(&self) -> Option { + self.queue.front().copied() + } +} + +impl Solution { + pub fn max_sliding_window(nums: Vec, k: i32) -> Vec { + let k = k as usize; + let n = nums.len(); + let mut max_queue = MaxQueue::new(); + let mut result: Vec = vec![0; n - k + 1]; + + // Fill initial window in the MaxQueue + for i in 0..k { + max_queue.enqueue(nums[i]); + } + + // Calculate maximum for each window + for i in k..n { + // Get maximum from MaxQueue + result[i - k] = max_queue.get_max().unwrap(); + + // Move window by dequeuing the element leaving the window + max_queue.dequeue(nums[i - k]); + + // Add the current element to the MaxQueue + max_queue.enqueue(nums[i]); + } + + // Get the maximum for the last window + result[n - k] = max_queue.get_max().unwrap(); + + result + } +} diff --git a/src/main/rust/g0201_0300/s0239_sliding_window_maximum/readme.md b/src/main/rust/g0201_0300/s0239_sliding_window_maximum/readme.md new file mode 100644 index 0000000..56ab6d2 --- /dev/null +++ b/src/main/rust/g0201_0300/s0239_sliding_window_maximum/readme.md @@ -0,0 +1,43 @@ +239\. Sliding Window Maximum + +Hard + +You are given an array of integers `nums`, there is a sliding window of size `k` which is moving from the very left of the array to the very right. You can only see the `k` numbers in the window. Each time the sliding window moves right by one position. + +Return _the max sliding window_. + +**Example 1:** + +**Input:** nums = [1,3,-1,-3,5,3,6,7], k = 3 + +**Output:** [3,3,5,5,6,7] + +**Explanation:** + +Window position Max + +--------------- ----- + +[1 3 -1] -3 5 3 6 7 **3** + +1 [3 -1 -3] 5 3 6 7 **3** + +1 3 [-1 -3 5] 3 6 7 **5** + +1 3 -1 [-3 5 3] 6 7 **5** + +1 3 -1 -3 [5 3 6] 7 **6** + +1 3 -1 -3 5 [3 6 7] **7** + +**Example 2:** + +**Input:** nums = [1], k = 1 + +**Output:** [1] + +**Constraints:** + +* 1 <= nums.length <= 105 +* -104 <= nums[i] <= 104 +* `1 <= k <= nums.length` \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/Solution.rs b/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/Solution.rs new file mode 100644 index 0000000..ef7c2b6 --- /dev/null +++ b/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/Solution.rs @@ -0,0 +1,27 @@ +// #Medium #Top_100_Liked_Questions #Array #Binary_Search #Matrix #Divide_and_Conquer +// #Data_Structure_II_Day_4_Array #Binary_Search_II_Day_8 #Big_O_Time_O(n+m)_Space_O(1) +// #2024_09_11_Time_0_ms_(100.00%)_Space_2.6_MB_(75.76%) + +impl Solution { + pub fn search_matrix(matrix: Vec>, target: i32) -> bool { + if matrix.is_empty() || matrix[0].is_empty() { + return false; + } + + let mut r = 0; + let mut c = matrix[0].len() as i32 - 1; + + while r < matrix.len() && c >= 0 { + let val = matrix[r][c as usize]; + if val == target { + return true; + } else if val > target { + c -= 1; + } else { + r += 1; + } + } + + false + } +} diff --git a/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/readme.md b/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/readme.md new file mode 100644 index 0000000..2afaef4 --- /dev/null +++ b/src/main/rust/g0201_0300/s0240_search_a_2d_matrix_ii/readme.md @@ -0,0 +1,34 @@ +240\. Search a 2D Matrix II + +Medium + +Write an efficient algorithm that searches for a value `target` in an `m x n` integer matrix `matrix`. This matrix has the following properties: + +* Integers in each row are sorted in ascending from left to right. +* Integers in each column are sorted in ascending from top to bottom. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2020/11/24/searchgrid2.jpg) + +**Input:** matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]], target = 5 + +**Output:** true + +**Example 2:** + +![](https://assets.leetcode.com/uploads/2020/11/24/searchgrid.jpg) + +**Input:** matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]], target = 20 + +**Output:** false + +**Constraints:** + +* `m == matrix.length` +* `n == matrix[i].length` +* `1 <= n, m <= 300` +* -109 <= matrix[i][j] <= 109 +* All the integers in each row are **sorted** in ascending order. +* All the integers in each column are **sorted** in ascending order. +* -109 <= target <= 109 \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0283_move_zeroes/Solution.rs b/src/main/rust/g0201_0300/s0283_move_zeroes/Solution.rs new file mode 100644 index 0000000..9b57b9b --- /dev/null +++ b/src/main/rust/g0201_0300/s0283_move_zeroes/Solution.rs @@ -0,0 +1,19 @@ +// #Easy #Top_100_Liked_Questions #Array #Two_Pointers #Algorithm_I_Day_3_Two_Pointers +// #Programming_Skills_I_Day_6_Array #Udemy_Arrays #Big_O_Time_O(n)_Space_O(1) +// #2024_09_11_Time_0_ms_(100.00%)_Space_2.3_MB_(81.98%) + +impl Solution { + pub fn move_zeroes(nums: &mut Vec) { + let mut first_zero = 0; + for i in 0..nums.len() { + if nums[i] != 0 { + Solution::swap(first_zero, i, nums); + first_zero += 1; + } + } + } + + fn swap(index1: usize, index2: usize, nums: &mut Vec) { + nums.swap(index1, index2); + } +} diff --git a/src/main/rust/g0201_0300/s0283_move_zeroes/readme.md b/src/main/rust/g0201_0300/s0283_move_zeroes/readme.md new file mode 100644 index 0000000..87c2f37 --- /dev/null +++ b/src/main/rust/g0201_0300/s0283_move_zeroes/readme.md @@ -0,0 +1,26 @@ +283\. Move Zeroes + +Easy + +Given an integer array `nums`, move all `0`'s to the end of it while maintaining the relative order of the non-zero elements. + +**Note** that you must do this in-place without making a copy of the array. + +**Example 1:** + +**Input:** nums = [0,1,0,3,12] + +**Output:** [1,3,12,0,0] + +**Example 2:** + +**Input:** nums = [0] + +**Output:** [0] + +**Constraints:** + +* 1 <= nums.length <= 104 +* -231 <= nums[i] <= 231 - 1 + +**Follow up:** Could you minimize the total number of operations done? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/Solution.rs b/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/Solution.rs new file mode 100644 index 0000000..14439a8 --- /dev/null +++ b/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/Solution.rs @@ -0,0 +1,16 @@ +// #Medium #Top_100_Liked_Questions #Array #Binary_Search #Two_Pointers #Bit_Manipulation +// #Binary_Search_II_Day_5 #Big_O_Time_O(n)_Space_O(n) +// #2024_09_11_Time_4_ms_(98.95%)_Space_3.2_MB_(46.32%) + +impl Solution { + pub fn find_duplicate(nums: Vec) -> i32 { + let mut arr = vec![0; nums.len() + 1]; + for &num in &nums { + arr[num as usize] += 1; + if arr[num as usize] == 2 { + return num; + } + } + 0 + } +} diff --git a/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/readme.md b/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/readme.md new file mode 100644 index 0000000..fb998f1 --- /dev/null +++ b/src/main/rust/g0201_0300/s0287_find_the_duplicate_number/readme.md @@ -0,0 +1,33 @@ +287\. Find the Duplicate Number + +Medium + +Given an array of integers `nums` containing `n + 1` integers where each integer is in the range `[1, n]` inclusive. + +There is only **one repeated number** in `nums`, return _this repeated number_. + +You must solve the problem **without** modifying the array `nums` and uses only constant extra space. + +**Example 1:** + +**Input:** nums = [1,3,4,2,2] + +**Output:** 2 + +**Example 2:** + +**Input:** nums = [3,1,3,4,2] + +**Output:** 3 + +**Constraints:** + +* 1 <= n <= 105 +* `nums.length == n + 1` +* `1 <= nums[i] <= n` +* All the integers in `nums` appear only **once** except for **precisely one integer** which appears **two or more** times. + +**Follow up:** + +* How can we prove that at least one duplicate number must exist in `nums`? +* Can you solve the problem in linear runtime complexity? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/MedianFinder.rs b/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/MedianFinder.rs new file mode 100644 index 0000000..0d7e8e0 --- /dev/null +++ b/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/MedianFinder.rs @@ -0,0 +1,66 @@ +// #Hard #Top_100_Liked_Questions #Sorting #Two_Pointers #Design #Heap_Priority_Queue #Data_Stream +// #Big_O_Time_O(n*log_n)_Space_O(n) #2024_09_11_Time_58_ms_(99.02%)_Space_23.2_MB_(84.31%) + +use std::collections::BinaryHeap; +use std::cmp::Reverse; + +struct MedianFinder { + max_heap: BinaryHeap, // Max heap for lower half + min_heap: BinaryHeap>, // Min heap for upper half +} + +/** + * `&self` means the method takes an immutable reference. + * If you need a mutable reference, change it to `&mut self` instead. + */ + +impl MedianFinder { + /** Initialize your data structure here. */ + pub fn new() -> Self { + MedianFinder { + max_heap: BinaryHeap::new(), // Max heap (lower half) + min_heap: BinaryHeap::new(), // Min heap (upper half), with Reverse for min behavior + } + } + + /** Add a number to the data structure */ + pub fn add_num(&mut self, num: i32) { + if self.max_heap.is_empty() || *self.max_heap.peek().unwrap() > num { + self.max_heap.push(num); // Add to the max heap (lower half) + } else { + self.min_heap.push(Reverse(num)); // Add to the min heap (upper half) + } + + // Balance the two heaps + if (self.max_heap.len() as i32 - self.min_heap.len() as i32).abs() > 1 { + self.balance(); + } + } + + /** Balance the heaps */ + fn balance(&mut self) { + if self.max_heap.len() > self.min_heap.len() { + self.min_heap.push(Reverse(self.max_heap.pop().unwrap())); + } else { + self.max_heap.push(self.min_heap.pop().unwrap().0); + } + } + + /** Find the median of the numbers added so far */ + pub fn find_median(&self) -> f64 { + if self.max_heap.len() == self.min_heap.len() { + (*self.max_heap.peek().unwrap() as f64 + self.min_heap.peek().unwrap().0 as f64) / 2.0 + } else if self.max_heap.len() > self.min_heap.len() { + *self.max_heap.peek().unwrap() as f64 + } else { + self.min_heap.peek().unwrap().0 as f64 + } + } +} + +/** + * Your MedianFinder object will be instantiated and called as such: + * let obj = MedianFinder::new(); + * obj.add_num(num); + * let ret_2: f64 = obj.find_median(); + */ diff --git a/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/readme.md b/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/readme.md new file mode 100644 index 0000000..3928225 --- /dev/null +++ b/src/main/rust/g0201_0300/s0295_find_median_from_data_stream/readme.md @@ -0,0 +1,43 @@ +295\. Find Median from Data Stream + +Hard + +The **median** is the middle value in an ordered integer list. If the size of the list is even, there is no middle value and the median is the mean of the two middle values. + +* For example, for `arr = [2,3,4]`, the median is `3`. +* For example, for `arr = [2,3]`, the median is `(2 + 3) / 2 = 2.5`. + +Implement the MedianFinder class: + +* `MedianFinder()` initializes the `MedianFinder` object. +* `void addNum(int num)` adds the integer `num` from the data stream to the data structure. +* `double findMedian()` returns the median of all elements so far. Answers within 10-5 of the actual answer will be accepted. + +**Example 1:** + +**Input** + + ["MedianFinder", "addNum", "addNum", "findMedian", "addNum", "findMedian"] + [[], [1], [2], [], [3], []] + +**Output:** [null, null, null, 1.5, null, 2.0] + +**Explanation:** + + MedianFinder medianFinder = new MedianFinder(); + medianFinder.addNum(1); // arr = [1] + medianFinder.addNum(2); // arr = [1, 2] + medianFinder.findMedian(); // return 1.5 (i.e., (1 + 2) / 2) + medianFinder.addNum(3); // arr[1, 2, 3] + medianFinder.findMedian(); // return 2.0 + +**Constraints:** + +* -105 <= num <= 105 +* There will be at least one element in the data structure before calling `findMedian`. +* At most 5 * 104 calls will be made to `addNum` and `findMedian`. + +**Follow up:** + +* If all integer numbers from the stream are in the range `[0, 100]`, how would you optimize your solution? +* If `99%` of all integer numbers from the stream are in the range `[0, 100]`, how would you optimize your solution? \ No newline at end of file diff --git a/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/Solution.rs b/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/Solution.rs new file mode 100644 index 0000000..0a9ddd3 --- /dev/null +++ b/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/Solution.rs @@ -0,0 +1,41 @@ +// #Medium #Top_100_Liked_Questions #Array #Dynamic_Programming #Binary_Search +// #Algorithm_II_Day_16_Dynamic_Programming #Binary_Search_II_Day_3 #Dynamic_Programming_I_Day_18 +// #Udemy_Dynamic_Programming #Big_O_Time_O(n*log_n)_Space_O(n) +// #2024_09_12_Time_0_ms_(100.00%)_Space_2.1_MB_(100.00%) + +impl Solution { + pub fn length_of_lis(nums: Vec) -> i32 { + if nums.is_empty() { + return 0; + } + + let mut dp = vec![i32::MAX; nums.len() + 1]; + let (mut left, mut right) = (1, 1); + + for &curr in nums.iter() { + let (mut start, mut end) = (left, right); + + // Binary search to find the position to update + while start + 1 < end { + let mid = start + (end - start) / 2; + if dp[mid as usize] > curr { + end = mid; + } else { + start = mid; + } + } + + // Update the dp array + if dp[start as usize] > curr { + dp[start as usize] = curr; + } else if curr > dp[start as usize] && curr < dp[end as usize] { + dp[end as usize] = curr; + } else if curr > dp[end as usize] { + dp[end as usize + 1] = curr; + right += 1; + } + } + + right + } +} diff --git a/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/readme.md b/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/readme.md new file mode 100644 index 0000000..1205789 --- /dev/null +++ b/src/main/rust/g0201_0300/s0300_longest_increasing_subsequence/readme.md @@ -0,0 +1,34 @@ +300\. Longest Increasing Subsequence + +Medium + +Given an integer array `nums`, return the length of the longest strictly increasing subsequence. + +A **subsequence** is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example, `[3,6,2,7]` is a subsequence of the array `[0,3,1,6,2,2,7]`. + +**Example 1:** + +**Input:** nums = [10,9,2,5,3,7,101,18] + +**Output:** 4 + +**Explanation:** The longest increasing subsequence is [2,3,7,101], therefore the length is 4. + +**Example 2:** + +**Input:** nums = [0,1,0,3,2,3] + +**Output:** 4 + +**Example 3:** + +**Input:** nums = [7,7,7,7,7,7,7] + +**Output:** 1 + +**Constraints:** + +* `1 <= nums.length <= 2500` +* -104 <= nums[i] <= 104 + +**Follow up:** Can you come up with an algorithm that runs in `O(n log(n))` time complexity? \ No newline at end of file diff --git a/src/main/rust/g0301_0400/s0322_coin_change/Solution.rs b/src/main/rust/g0301_0400/s0322_coin_change/Solution.rs new file mode 100644 index 0000000..53af2fa --- /dev/null +++ b/src/main/rust/g0301_0400/s0322_coin_change/Solution.rs @@ -0,0 +1,31 @@ +// #Medium #Top_100_Liked_Questions #Array #Dynamic_Programming #Breadth_First_Search +// #Algorithm_II_Day_18_Dynamic_Programming #Dynamic_Programming_I_Day_20 +// #Level_2_Day_12_Dynamic_Programming #Big_O_Time_O(m*n)_Space_O(amount) +// #2024_09_12_Time_3_ms_(100.00%)_Space_2.2_MB_(69.95%) + +impl Solution { + pub fn coin_change(coins: Vec, amount: i32) -> i32 { + let mut dp = vec![0; (amount + 1) as usize]; + dp[0] = 1; // Base case: one way to make 0 amount (using no coins) + + for &coin in &coins { + for i in coin..=amount { + let prev = dp[(i - coin) as usize]; + if prev > 0 { + if dp[i as usize] == 0 { + dp[i as usize] = prev + 1; + } else { + dp[i as usize] = dp[i as usize].min(prev + 1); + } + } + } + } + + // If the dp[amount] is still 0, it means no solution was found + if dp[amount as usize] == 0 { + -1 + } else { + dp[amount as usize] - 1 + } + } +} diff --git a/src/main/rust/g0301_0400/s0322_coin_change/readme.md b/src/main/rust/g0301_0400/s0322_coin_change/readme.md new file mode 100644 index 0000000..9bd2262 --- /dev/null +++ b/src/main/rust/g0301_0400/s0322_coin_change/readme.md @@ -0,0 +1,35 @@ +322\. Coin Change + +Medium + +You are given an integer array `coins` representing coins of different denominations and an integer `amount` representing a total amount of money. + +Return _the fewest number of coins that you need to make up that amount_. If that amount of money cannot be made up by any combination of the coins, return `-1`. + +You may assume that you have an infinite number of each kind of coin. + +**Example 1:** + +**Input:** coins = [1,2,5], amount = 11 + +**Output:** 3 + +**Explanation:** 11 = 5 + 5 + 1 + +**Example 2:** + +**Input:** coins = [2], amount = 3 + +**Output:** -1 + +**Example 3:** + +**Input:** coins = [1], amount = 0 + +**Output:** 0 + +**Constraints:** + +* `1 <= coins.length <= 12` +* 1 <= coins[i] <= 231 - 1 +* 0 <= amount <= 104 \ No newline at end of file diff --git a/src/main/rust/g0301_0400/s0338_counting_bits/Solution.rs b/src/main/rust/g0301_0400/s0338_counting_bits/Solution.rs new file mode 100644 index 0000000..13255f1 --- /dev/null +++ b/src/main/rust/g0301_0400/s0338_counting_bits/Solution.rs @@ -0,0 +1,24 @@ +// #Easy #Dynamic_Programming #Bit_Manipulation #Udemy_Bit_Manipulation +// #Big_O_Time_O(num)_Space_O(num) #2024_09_12_Time_0_ms_(100.00%)_Space_2.6_MB_(15.06%) + +impl Solution { + pub fn count_bits(num: i32) -> Vec { + let mut result = vec![0; (num + 1) as usize]; + let mut border_pos = 1; + let mut incr_pos = 1; + + for i in 1..=num { + // When we reach a power of 2, reset border_pos and incr_pos + if incr_pos == border_pos { + result[i as usize] = 1; + incr_pos = 1; + border_pos = i; + } else { + result[i as usize] = 1 + result[incr_pos as usize]; + incr_pos += 1; + } + } + + result + } +} diff --git a/src/main/rust/g0301_0400/s0338_counting_bits/readme.md b/src/main/rust/g0301_0400/s0338_counting_bits/readme.md new file mode 100644 index 0000000..e0d6f7e --- /dev/null +++ b/src/main/rust/g0301_0400/s0338_counting_bits/readme.md @@ -0,0 +1,41 @@ +338\. Counting Bits + +Easy + +Given an integer `n`, return _an array_ `ans` _of length_ `n + 1` _such that for each_ `i` (`0 <= i <= n`)_,_ `ans[i]` _is the **number of**_ `1`_**'s** in the binary representation of_ `i`. + +**Example 1:** + +**Input:** n = 2 + +**Output:** [0,1,1] + +**Explanation:** + + 0 --> 0 + 1 --> 1 + 2 --> 10 + +**Example 2:** + +**Input:** n = 5 + +**Output:** [0,1,1,2,1,2] + +**Explanation:** + + 0 --> 0 + 1 --> 1 + 2 --> 10 + 3 --> 11 + 4 --> 100 + 5 --> 101 + +**Constraints:** + +* 0 <= n <= 105 + +**Follow up:** + +* It is very easy to come up with a solution with a runtime of `O(n log n)`. Can you do it in linear time `O(n)` and possibly in a single pass? +* Can you do it without using any built-in function (i.e., like `__builtin_popcount` in C++)? \ No newline at end of file diff --git a/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/Solution.rs b/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/Solution.rs new file mode 100644 index 0000000..ceb80d7 --- /dev/null +++ b/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/Solution.rs @@ -0,0 +1,36 @@ +// #Medium #Top_100_Liked_Questions #Array #Hash_Table #Sorting #Heap_Priority_Queue #Counting +// #Divide_and_Conquer #Quickselect #Bucket_Sort #Data_Structure_II_Day_20_Heap_Priority_Queue +// #Big_O_Time_O(n*log(n))_Space_O(k) #2024_09_12_Time_0_ms_(100.00%)_Space_2.4_MB_(66.00%) + +use std::collections::HashMap; + +impl Solution { + pub fn top_k_frequent(nums: Vec, k: i32) -> Vec { + nums.iter().fold(HashMap::new(), |mut map, n| { + let mut counter = map.entry(n).or_insert(0); + *counter += 1; + map + }) + .drain() + .fold(vec![(0, 0); k as usize], |mut top_k, (&num, count)| { + if count > top_k[0].1 { + top_k[0] = (num, count); + + let mut next_index = 1; + while next_index < k as usize { + if count > top_k[next_index].1 { + let temp = top_k[next_index]; + top_k[next_index] = (num, count); + top_k[next_index - 1] = temp; + } + next_index += 1; + } + } + + top_k + }) + .into_iter() + .map(|(num, count)| num) + .collect() + } +} diff --git a/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/readme.md b/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/readme.md new file mode 100644 index 0000000..82f6026 --- /dev/null +++ b/src/main/rust/g0301_0400/s0347_top_k_frequent_elements/readme.md @@ -0,0 +1,26 @@ +347\. Top K Frequent Elements + +Medium + +Given an integer array `nums` and an integer `k`, return _the_ `k` _most frequent elements_. You may return the answer in **any order**. + +**Example 1:** + +**Input:** nums = [1,1,1,2,2,3], k = 2 + +**Output:** [1,2] + +**Example 2:** + +**Input:** nums = [1], k = 1 + +**Output:** [1] + +**Constraints:** + +* 1 <= nums.length <= 105 +* -104 <= nums[i] <= 104 +* `k` is in the range `[1, the number of unique elements in the array]`. +* It is **guaranteed** that the answer is **unique**. + +**Follow up:** Your algorithm's time complexity must be better than `O(n log n)`, where n is the array's size. \ No newline at end of file diff --git a/src/main/rust/g0301_0400/s0394_decode_string/Solution.rs b/src/main/rust/g0301_0400/s0394_decode_string/Solution.rs new file mode 100644 index 0000000..0fd6f80 --- /dev/null +++ b/src/main/rust/g0301_0400/s0394_decode_string/Solution.rs @@ -0,0 +1,31 @@ +// #Medium #Top_100_Liked_Questions #String #Stack #Recursion #Level_1_Day_14_Stack #Udemy_Strings +// #Big_O_Time_O(n)_Space_O(n) #2024_09_12_Time_0_ms_(100.00%)_Space_2.1_MB_(24.04%) + +impl Solution { + pub fn decode_string(s: String) -> String { + s + .chars() + .fold((String::new(), String::new(), Vec::new()), |(mut next_string, mut next_integer, mut stack): (String, String, Vec<(usize, String)>), c| { + match c { + '0'..='9' => { + next_integer.push(c); + (next_string, next_integer, stack) + }, + '[' => { + stack.push((next_integer.parse::().unwrap(), next_string)); + next_integer.clear(); + (String::new(), next_integer, stack) + }, + ']' => { + let (last_integer, left_string) = stack.pop().unwrap(); + let next_string = left_string + &next_string.repeat(last_integer); + (next_string, next_integer, stack) + }, + c => { + next_string.push(c); + (next_string, next_integer, stack) + } + } + }).0 + } +} diff --git a/src/main/rust/g0301_0400/s0394_decode_string/readme.md b/src/main/rust/g0301_0400/s0394_decode_string/readme.md new file mode 100644 index 0000000..06345e9 --- /dev/null +++ b/src/main/rust/g0301_0400/s0394_decode_string/readme.md @@ -0,0 +1,36 @@ +394\. Decode String + +Medium + +Given an encoded string, return its decoded string. + +The encoding rule is: `k[encoded_string]`, where the `encoded_string` inside the square brackets is being repeated exactly `k` times. Note that `k` is guaranteed to be a positive integer. + +You may assume that the input string is always valid; there are no extra white spaces, square brackets are well-formed, etc. Furthermore, you may assume that the original data does not contain any digits and that digits are only for those repeat numbers, `k`. For example, there will not be input like `3a` or `2[4]`. + +The test cases are generated so that the length of the output will never exceed 105. + +**Example 1:** + +**Input:** s = "3[a]2[bc]" + +**Output:** "aaabcbc" + +**Example 2:** + +**Input:** s = "3[a2[c]]" + +**Output:** "accaccacc" + +**Example 3:** + +**Input:** s = "2[abc]3[cd]ef" + +**Output:** "abcabccdcdcdef" + +**Constraints:** + +* `1 <= s.length <= 30` +* `s` consists of lowercase English letters, digits, and square brackets `'[]'`. +* `s` is guaranteed to be **a valid** input. +* All the integers in `s` are in the range `[1, 300]`. \ No newline at end of file diff --git a/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/Solution.rs b/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/Solution.rs new file mode 100644 index 0000000..5c5f223 --- /dev/null +++ b/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/Solution.rs @@ -0,0 +1,24 @@ +// #Medium #Top_100_Liked_Questions #Array #Dynamic_Programming #Level_2_Day_13_Dynamic_Programming +// #Big_O_Time_O(n*sums)_Space_O(n*sums) #2024_09_12_Time_20_ms_(74.07%)_Space_2.2_MB_(81.48%) + +impl Solution { + pub fn can_partition(nums: Vec) -> bool { + let mut sums: i32 = nums.iter().sum(); + + if sums % 2 != 0 { + return false; + } + + sums /= 2; + let mut dp = vec![false; (sums + 1) as usize]; + dp[0] = true; + + for &num in &nums { + for sum in (num..=sums).rev() { + dp[sum as usize] = dp[sum as usize] || dp[(sum - num) as usize]; + } + } + + dp[sums as usize] + } +} diff --git a/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/readme.md b/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/readme.md new file mode 100644 index 0000000..8c6aa8b --- /dev/null +++ b/src/main/rust/g0401_0500/s0416_partition_equal_subset_sum/readme.md @@ -0,0 +1,26 @@ +416\. Partition Equal Subset Sum + +Medium + +Given a **non-empty** array `nums` containing **only positive integers**, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. + +**Example 1:** + +**Input:** nums = [1,5,11,5] + +**Output:** true + +**Explanation:** The array can be partitioned as [1, 5, 5] and [11]. + +**Example 2:** + +**Input:** nums = [1,2,3,5] + +**Output:** false + +**Explanation:** The array cannot be partitioned into equal sum subsets. + +**Constraints:** + +* `1 <= nums.length <= 200` +* `1 <= nums[i] <= 100` \ No newline at end of file diff --git a/src/main/rust/g0401_0500/s0437_path_sum_iii/Solution.rs b/src/main/rust/g0401_0500/s0437_path_sum_iii/Solution.rs new file mode 100644 index 0000000..200b9d3 --- /dev/null +++ b/src/main/rust/g0401_0500/s0437_path_sum_iii/Solution.rs @@ -0,0 +1,52 @@ +// #Medium #Depth_First_Search #Tree #Binary_Tree #Level_2_Day_7_Tree #Big_O_Time_O(n)_Space_O(n) +// #2024_09_12_Time_0_ms_(100.00%)_Space_4.7_MB_(10.42%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +impl Solution { + pub fn path_sum(root: Option>>, target_sum: i32) -> i32 { + let target_sum = target_sum as i64; + let mut stack = vec![(root, vec![])]; + let mut ans = 0; + while let Some((node, mut path)) = stack.pop() { + if let Some(node) = node { + let node = node.borrow(); + path.push(node.val); + ans += path + .iter() + .rev() + .fold((0, 0), |(res, acc), &x| { + let new_acc = acc + x as i64; + ( + res + (new_acc == target_sum) as i32, + new_acc + ) + }) + .0; + stack.push((node.left.clone(), path.clone())); + stack.push((node.right.clone(), path.clone())); + } else { + continue; + } + } + ans + } +} diff --git a/src/main/rust/g0401_0500/s0437_path_sum_iii/readme.md b/src/main/rust/g0401_0500/s0437_path_sum_iii/readme.md new file mode 100644 index 0000000..fda8a25 --- /dev/null +++ b/src/main/rust/g0401_0500/s0437_path_sum_iii/readme.md @@ -0,0 +1,29 @@ +437\. Path Sum III + +Medium + +Given the `root` of a binary tree and an integer `targetSum`, return _the number of paths where the sum of the values along the path equals_ `targetSum`. + +The path does not need to start or end at the root or a leaf, but it must go downwards (i.e., traveling only from parent nodes to child nodes). + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/04/09/pathsum3-1-tree.jpg) + +**Input:** root = [10,5,-3,3,2,null,11,3,-2,null,1], targetSum = 8 + +**Output:** 3 + +**Explanation:** The paths that sum to 8 are shown. + +**Example 2:** + +**Input:** root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22 + +**Output:** 3 + +**Constraints:** + +* The number of nodes in the tree is in the range `[0, 1000]`. +* -109 <= Node.val <= 109 +* `-1000 <= targetSum <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/Solution.rs b/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/Solution.rs new file mode 100644 index 0000000..3dcde96 --- /dev/null +++ b/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/Solution.rs @@ -0,0 +1,42 @@ +// #Medium #Top_100_Liked_Questions #String #Hash_Table #Sliding_Window +// #Algorithm_II_Day_5_Sliding_Window #Programming_Skills_II_Day_12 +// #Level_1_Day_12_Sliding_Window/Two_Pointer #Big_O_Time_O(n+m)_Space_O(1) +// #2024_09_12_Time_2_ms_(89.29%)_Space_2.2_MB_(100.00%) + +use std::collections::VecDeque; + +impl Solution { + pub fn find_anagrams(s: String, p: String) -> Vec { + let mut map = vec![0; 26]; + let p_len = p.len(); + let s_len = s.len(); + + // Fill the map with the character frequencies of string `p` + for ch in p.chars() { + map[ch as usize - 'a' as usize] += 1; + } + + let mut res = Vec::new(); + let mut j = 0; + + // Sliding window + for i in 0..s_len { + let idx = s.as_bytes()[i] as usize - 'a' as usize; + map[idx] -= 1; + + // If window size exceeds p_len, remove the left character + if i >= p_len { + let left_idx = s.as_bytes()[j] as usize - 'a' as usize; + map[left_idx] += 1; + j += 1; + } + + // Check if the window is an anagram of `p` + if i >= p_len - 1 && map.iter().all(|&x| x == 0) { + res.push(j as i32); + } + } + + res + } +} diff --git a/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/readme.md b/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/readme.md new file mode 100644 index 0000000..acf2069 --- /dev/null +++ b/src/main/rust/g0401_0500/s0438_find_all_anagrams_in_a_string/readme.md @@ -0,0 +1,38 @@ +438\. Find All Anagrams in a String + +Medium + +Given two strings `s` and `p`, return _an array of all the start indices of_ `p`_'s anagrams in_ `s`. You may return the answer in **any order**. + +An **Anagram** is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. + +**Example 1:** + +**Input:** s = "cbaebabacd", p = "abc" + +**Output:** [0,6] + +**Explanation:** + +The substring with start index = 0 is "cba", which is an anagram of "abc". + +The substring with start index = 6 is "bac", which is an anagram of "abc". + +**Example 2:** + +**Input:** s = "abab", p = "ab" + +**Output:** [0,1,2] + +**Explanation:** + +The substring with start index = 0 is "ab", which is an anagram of "ab". + +The substring with start index = 1 is "ba", which is an anagram of "ab". + +The substring with start index = 2 is "ab", which is an anagram of "ab". + +**Constraints:** + +* 1 <= s.length, p.length <= 3 * 104 +* `s` and `p` consist of lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g0401_0500/s0494_target_sum/Solution.rs b/src/main/rust/g0401_0500/s0494_target_sum/Solution.rs new file mode 100644 index 0000000..fef90c9 --- /dev/null +++ b/src/main/rust/g0401_0500/s0494_target_sum/Solution.rs @@ -0,0 +1,42 @@ +// #Medium #Array #Dynamic_Programming #Backtracking #Big_O_Time_O(n*(sum+s))_Space_O(n*(sum+s)) +// #2024_09_12_Time_3_ms_(83.33%)_Space_2.2_MB_(41.67%) + +impl Solution { + pub fn find_target_sum_ways(nums: Vec, s: i32) -> i32 { + let mut sum: i32 = nums.iter().sum(); + let s = s.abs(); + + // Invalid cases + if s > sum || (sum + s) % 2 != 0 { + return 0; + } + + let target = (sum + s) / 2; + let n = nums.len(); + + // dp[i] represents the number of ways to form sum i + let mut dp = vec![vec![0; n + 1]; (target + 1) as usize]; + dp[0][0] = 1; + + // Handle empty knapsack condition + for i in 0..n { + if nums[i] == 0 { + dp[0][i + 1] = dp[0][i] * 2; + } else { + dp[0][i + 1] = dp[0][i]; + } + } + + // Fill the dp table + for i in 1..=target { + for j in 0..n { + dp[i as usize][j + 1] += dp[i as usize][j]; + if nums[j] <= i { + dp[i as usize][j + 1] += dp[(i - nums[j]) as usize][j]; + } + } + } + + dp[target as usize][n] + } +} diff --git a/src/main/rust/g0401_0500/s0494_target_sum/readme.md b/src/main/rust/g0401_0500/s0494_target_sum/readme.md new file mode 100644 index 0000000..6ef52df --- /dev/null +++ b/src/main/rust/g0401_0500/s0494_target_sum/readme.md @@ -0,0 +1,42 @@ +494\. Target Sum + +Medium + +You are given an integer array `nums` and an integer `target`. + +You want to build an **expression** out of nums by adding one of the symbols `'+'` and `'-'` before each integer in nums and then concatenate all the integers. + +* For example, if `nums = [2, 1]`, you can add a `'+'` before `2` and a `'-'` before `1` and concatenate them to build the expression `"+2-1"`. + +Return the number of different **expressions** that you can build, which evaluates to `target`. + +**Example 1:** + +**Input:** nums = [1,1,1,1,1], target = 3 + +**Output:** 5 + +**Explanation:** There are 5 ways to assign symbols to make the sum of nums be target 3. + +-1 + 1 + 1 + 1 + 1 = 3 + ++1 - 1 + 1 + 1 + 1 = 3 + ++1 + 1 - 1 + 1 + 1 = 3 + ++1 + 1 + 1 - 1 + 1 = 3 + + +1 + 1 + 1 + 1 - 1 = 3 + +**Example 2:** + +**Input:** nums = [1], target = 1 + +**Output:** 1 + +**Constraints:** + +* `1 <= nums.length <= 20` +* `0 <= nums[i] <= 1000` +* `0 <= sum(nums[i]) <= 1000` +* `-1000 <= target <= 1000` \ No newline at end of file diff --git a/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/Solution.rs b/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/Solution.rs new file mode 100644 index 0000000..3caa24f --- /dev/null +++ b/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/Solution.rs @@ -0,0 +1,51 @@ +// #Easy #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree #Level_2_Day_7_Tree +// #Udemy_Tree_Stack_Queue #Big_O_Time_O(n)_Space_O(n) +// #2024_09_13_Time_0_ms_(100.00%)_Space_3.9_MB_(13.76%) + +// Definition for a binary tree node. +// #[derive(Debug, PartialEq, Eq)] +// pub struct TreeNode { +// pub val: i32, +// pub left: Option>>, +// pub right: Option>>, +// } +// +// impl TreeNode { +// #[inline] +// pub fn new(val: i32) -> Self { +// TreeNode { +// val, +// left: None, +// right: None +// } +// } +// } +use std::rc::Rc; +use std::cell::RefCell; +use std::cmp::max; +impl Solution { + pub fn diameter_of_binary_tree(root: Option>>) -> i32 { + let mut diameter = 0; + + fn helper(root: Option>>, diameter: &mut i32) -> (i32, i32) { + if let Some(root) = root { + let (l1, l2) = helper(root.borrow().left.clone(), diameter); + let (r1, r2) = helper(root.borrow().right.clone(), diameter); + + *diameter = max(*diameter, l1 + l2); + *diameter = max(*diameter, r1 + r2); + + let l = l1.max(l2) + 1; + let r = r1.max(r2) + 1; + return (l, r); + } + + // (depth, diameter that doesn't pass through ) + (-1, -1) + } + + let (l, r) = helper(root, &mut diameter); + diameter = max(diameter, l + r); + diameter + } +} diff --git a/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/readme.md b/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/readme.md new file mode 100644 index 0000000..fabb558 --- /dev/null +++ b/src/main/rust/g0501_0600/s0543_diameter_of_binary_tree/readme.md @@ -0,0 +1,30 @@ +543\. Diameter of Binary Tree + +Easy + +Given the `root` of a binary tree, return _the length of the **diameter** of the tree_. + +The **diameter** of a binary tree is the **length** of the longest path between any two nodes in a tree. This path may or may not pass through the `root`. + +The **length** of a path between two nodes is represented by the number of edges between them. + +**Example 1:** + +![](https://assets.leetcode.com/uploads/2021/03/06/diamtree.jpg) + +**Input:** root = [1,2,3,4,5] + +**Output:** 3 + +**Explanation:** 3 is the length of the path [4,2,1,3] or [5,2,1,3]. + +**Example 2:** + +**Input:** root = [1,2] + +**Output:** 1 + +**Constraints:** + +* The number of nodes in the tree is in the range [1, 104]. +* `-100 <= Node.val <= 100` \ No newline at end of file diff --git a/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/Solution.rs b/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/Solution.rs new file mode 100644 index 0000000..0a3bbc5 --- /dev/null +++ b/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/Solution.rs @@ -0,0 +1,24 @@ +// #Medium #Top_100_Liked_Questions #Array #Hash_Table #Prefix_Sum #Data_Structure_II_Day_5_Array +// #Big_O_Time_O(n)_Space_O(n) #2024_09_13_Time_7_ms_(96.88%)_Space_2.8_MB_(25.00%) + +use std::collections::HashMap; + +impl Solution { + pub fn subarray_sum(nums: Vec, k: i32) -> i32 { + let mut temp_sum = 0; + let mut ret = 0; + let mut sum_count: HashMap = HashMap::new(); + sum_count.insert(0, 1); + + for &num in nums.iter() { + temp_sum += num; + if let Some(&count) = sum_count.get(&(temp_sum - k)) { + ret += count; + } + let entry = sum_count.entry(temp_sum).or_insert(0); + *entry += 1; + } + + ret + } +} diff --git a/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/readme.md b/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/readme.md new file mode 100644 index 0000000..404bdf4 --- /dev/null +++ b/src/main/rust/g0501_0600/s0560_subarray_sum_equals_k/readme.md @@ -0,0 +1,25 @@ +560\. Subarray Sum Equals K + +Medium + +Given an array of integers `nums` and an integer `k`, return _the total number of subarrays whose sum equals to_ `k`. + +A subarray is a contiguous **non-empty** sequence of elements within an array. + +**Example 1:** + +**Input:** nums = [1,1,1], k = 2 + +**Output:** 2 + +**Example 2:** + +**Input:** nums = [1,2,3], k = 3 + +**Output:** 2 + +**Constraints:** + +* 1 <= nums.length <= 2 * 104 +* `-1000 <= nums[i] <= 1000` +* -107 <= k <= 107 \ No newline at end of file diff --git a/src/main/rust/g0601_0700/s0647_palindromic_substrings/Solution.rs b/src/main/rust/g0601_0700/s0647_palindromic_substrings/Solution.rs new file mode 100644 index 0000000..fd38594 --- /dev/null +++ b/src/main/rust/g0601_0700/s0647_palindromic_substrings/Solution.rs @@ -0,0 +1,26 @@ +// #Medium #String #Dynamic_Programming #Big_O_Time_O(n^2)_Space_O(n) +// #2024_09_13_Time_0_ms_(100.00%)_Space_2.2_MB_(38.46%) + +impl Solution { + fn expand(s: &[char], mut l: i32, mut r: i32, res: &mut i32) { + while l >= 0 && (r as usize) < s.len() { + if s[l as usize] != s[r as usize] { + return; + } else { + *res += 1; + l -= 1; + r += 1; + } + } + } + + pub fn count_substrings(s: String) -> i32 { + let a: Vec = s.chars().collect(); + let mut res = 0; + for i in 0..a.len() { + Solution::expand(&a, i as i32, i as i32, &mut res); // Odd length palindromes + Solution::expand(&a, i as i32, (i + 1) as i32, &mut res); // Even length palindromes + } + res + } +} diff --git a/src/main/rust/g0601_0700/s0647_palindromic_substrings/readme.md b/src/main/rust/g0601_0700/s0647_palindromic_substrings/readme.md new file mode 100644 index 0000000..9e27626 --- /dev/null +++ b/src/main/rust/g0601_0700/s0647_palindromic_substrings/readme.md @@ -0,0 +1,30 @@ +647\. Palindromic Substrings + +Medium + +Given a string `s`, return _the number of **palindromic substrings** in it_. + +A string is a **palindrome** when it reads the same backward as forward. + +A **substring** is a contiguous sequence of characters within the string. + +**Example 1:** + +**Input:** s = "abc" + +**Output:** 3 + +**Explanation:** Three palindromic strings: "a", "b", "c". + +**Example 2:** + +**Input:** s = "aaa" + +**Output:** 6 + +**Explanation:** Six palindromic strings: "a", "a", "a", "aa", "aa", "aaa". + +**Constraints:** + +* `1 <= s.length <= 1000` +* `s` consists of lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g0701_0800/s0739_daily_temperatures/Solution.rs b/src/main/rust/g0701_0800/s0739_daily_temperatures/Solution.rs new file mode 100644 index 0000000..b864e58 --- /dev/null +++ b/src/main/rust/g0701_0800/s0739_daily_temperatures/Solution.rs @@ -0,0 +1,21 @@ +// #Medium #Top_100_Liked_Questions #Array #Stack #Monotonic_Stack #Programming_Skills_II_Day_6 +// #Big_O_Time_O(n)_Space_O(n) #2024_09_13_Time_33_ms_(91.80%)_Space_3.4_MB_(99.45%) + +impl Solution { + pub fn daily_temperatures(temperatures: Vec) -> Vec { + let mut sol = vec![0; temperatures.len()]; + for i in (0..temperatures.len() - 1).rev() { + let mut j = i + 1; + while j < temperatures.len() { + if temperatures[i] < temperatures[j] { + sol[i] = (j - i) as i32; + break; + } else if sol[j] == 0 { + break; + } + j += sol[j] as usize; + } + } + sol + } +} diff --git a/src/main/rust/g0701_0800/s0739_daily_temperatures/readme.md b/src/main/rust/g0701_0800/s0739_daily_temperatures/readme.md new file mode 100644 index 0000000..4d2b9ad --- /dev/null +++ b/src/main/rust/g0701_0800/s0739_daily_temperatures/readme.md @@ -0,0 +1,28 @@ +739\. Daily Temperatures + +Medium + +Given an array of integers `temperatures` represents the daily temperatures, return _an array_ `answer` _such that_ `answer[i]` _is the number of days you have to wait after the_ ith _day to get a warmer temperature_. If there is no future day for which this is possible, keep `answer[i] == 0` instead. + +**Example 1:** + +**Input:** temperatures = [73,74,75,71,69,72,76,73] + +**Output:** [1,1,4,2,1,1,0,0] + +**Example 2:** + +**Input:** temperatures = [30,40,50,60] + +**Output:** [1,1,1,0] + +**Example 3:** + +**Input:** temperatures = [30,60,90] + +**Output:** [1,1,0] + +**Constraints:** + +* 1 <= temperatures.length <= 105 +* `30 <= temperatures[i] <= 100` \ No newline at end of file diff --git a/src/main/rust/g0701_0800/s0763_partition_labels/Solution.rs b/src/main/rust/g0701_0800/s0763_partition_labels/Solution.rs new file mode 100644 index 0000000..4a6f2af --- /dev/null +++ b/src/main/rust/g0701_0800/s0763_partition_labels/Solution.rs @@ -0,0 +1,36 @@ +// #Medium #String #Hash_Table #Greedy #Two_Pointers #Data_Structure_II_Day_7_String +// #Big_O_Time_O(n)_Space_O(1) #2024_09_13_Time_1_ms_(97.06%)_Space_2.1_MB_(41.18%) + +impl Solution { + pub fn partition_labels(s: String) -> Vec { + let letters: Vec = s.chars().collect(); + let mut result = Vec::new(); + let mut position = vec![0; 26]; + + // Store the last occurrence of each letter in the string + for (i, &ch) in letters.iter().enumerate() { + position[(ch as usize) - ('a' as usize)] = i; + } + + let mut i = 0; + let mut prev = -1; + let mut max = 0; + + // Iterate over the string to find partitions + while i < letters.len() { + let ch_pos = position[(letters[i] as usize) - ('a' as usize)]; + if ch_pos > max { + max = ch_pos; + } + + if i == max { + result.push((i as i32) - (prev as i32)); + prev = i as i32; + } + + i += 1; + } + + result + } +} diff --git a/src/main/rust/g0701_0800/s0763_partition_labels/readme.md b/src/main/rust/g0701_0800/s0763_partition_labels/readme.md new file mode 100644 index 0000000..4c9453d --- /dev/null +++ b/src/main/rust/g0701_0800/s0763_partition_labels/readme.md @@ -0,0 +1,28 @@ +763\. Partition Labels + +Medium + +You are given a string `s`. We want to partition the string into as many parts as possible so that each letter appears in at most one part. + +Note that the partition is done so that after concatenating all the parts in order, the resultant string should be `s`. + +Return _a list of integers representing the size of these parts_. + +**Example 1:** + +**Input:** s = "ababcbacadefegdehijhklij" + +**Output:** [9,7,8] + +**Explanation:** The partition is "ababcbaca", "defegde", "hijhklij". This is a partition so that each letter appears in at most one part. A partition like "ababcbacadefegde", "hijhklij" is incorrect, because it splits s into less parts. + +**Example 2:** + +**Input:** s = "eccbbbbdec" + +**Output:** [10] + +**Constraints:** + +* `1 <= s.length <= 500` +* `s` consists of lowercase English letters. \ No newline at end of file diff --git a/src/main/rust/g1101_1200/s1143_longest_common_subsequence/Solution.rs b/src/main/rust/g1101_1200/s1143_longest_common_subsequence/Solution.rs new file mode 100644 index 0000000..da97641 --- /dev/null +++ b/src/main/rust/g1101_1200/s1143_longest_common_subsequence/Solution.rs @@ -0,0 +1,31 @@ +// #Medium #Top_100_Liked_Questions #String #Dynamic_Programming +// #Algorithm_II_Day_17_Dynamic_Programming #Dynamic_Programming_I_Day_19 +// #Udemy_Dynamic_Programming #Big_O_Time_O(n*m)_Space_O(n*m) +// #2024_09_13_Time_4_ms_(78.99%)_Space_5.8_MB_(55.07%) + +impl Solution { + pub fn longest_common_subsequence(text1: String, text2: String) -> i32 { + let n = text1.len(); + let m = text2.len(); + + // Create a 2D dp array initialized to 0 + let mut dp = vec![vec![0; m + 1]; n + 1]; + + // Convert the strings to a vector of chars for easier access + let chars1: Vec = text1.chars().collect(); + let chars2: Vec = text2.chars().collect(); + + // Fill the dp array + for i in 1..=n { + for j in 1..=m { + if chars1[i - 1] == chars2[j - 1] { + dp[i][j] = dp[i - 1][j - 1] + 1; + } else { + dp[i][j] = dp[i - 1][j].max(dp[i][j - 1]); + } + } + } + + dp[n][m] + } +} diff --git a/src/main/rust/g1101_1200/s1143_longest_common_subsequence/readme.md b/src/main/rust/g1101_1200/s1143_longest_common_subsequence/readme.md new file mode 100644 index 0000000..b6504b9 --- /dev/null +++ b/src/main/rust/g1101_1200/s1143_longest_common_subsequence/readme.md @@ -0,0 +1,40 @@ +1143\. Longest Common Subsequence + +Medium + +Given two strings `text1` and `text2`, return _the length of their longest **common subsequence**._ If there is no **common subsequence**, return `0`. + +A **subsequence** of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters. + +* For example, `"ace"` is a subsequence of `"abcde"`. + +A **common subsequence** of two strings is a subsequence that is common to both strings. + +**Example 1:** + +**Input:** text1 = "abcde", text2 = "ace" + +**Output:** 3 + +**Explanation:** The longest common subsequence is "ace" and its length is 3. + +**Example 2:** + +**Input:** text1 = "abc", text2 = "abc" + +**Output:** 3 + +**Explanation:** The longest common subsequence is "abc" and its length is 3. + +**Example 3:** + +**Input:** text1 = "abc", text2 = "def" + +**Output:** 0 + +**Explanation:** There is no such common subsequence, so the result is 0. + +**Constraints:** + +* `1 <= text1.length, text2.length <= 1000` +* `text1` and `text2` consist of only lowercase English characters. \ No newline at end of file