Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
506 changes: 387 additions & 119 deletions README.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main/kotlin/g0001_0100/s0001_two_sum/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package 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)
// #AI_can_be_used_to_solve_the_task #2023_07_03_Time_202_ms_(91.18%)_Space_38.1_MB_(76.07%)
// #Data_Structure_I_Day_2_Array #Level_1_Day_13_Hashmap #Udemy_Arrays #Top_Interview_150_Hashmap
// #Big_O_Time_O(n)_Space_O(n) #AI_can_be_used_to_solve_the_task
// #2023_07_03_Time_202_ms_(91.18%)_Space_38.1_MB_(76.07%)

class Solution {
fun twoSum(numbers: IntArray, target: Int): IntArray {
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/g0001_0100/s0002_add_two_numbers/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package 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)) #AI_can_be_used_to_solve_the_task
// #2023_07_03_Time_203_ms_(96.13%)_Space_41_MB_(77.03%)
// #Top_Interview_150_Linked_List #Big_O_Time_O(max(N,M))_Space_O(max(N,M))
// #AI_can_be_used_to_solve_the_task #2023_07_03_Time_203_ms_(96.13%)_Space_41_MB_(77.03%)

import com_github_leetcode.ListNode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package 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) #AI_can_be_used_to_solve_the_task
// #Top_Interview_150_Sliding_Window #Big_O_Time_O(n)_Space_O(1) #AI_can_be_used_to_solve_the_task
// #2023_07_03_Time_201_ms_(87.28%)_Space_38.3_MB_(60.85%)

class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package 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) #AI_can_be_used_to_solve_the_task
// #2023_07_03_Time_293_ms_(75.96%)_Space_47.5_MB_(64.85%)
// #Top_Interview_150_Binary_Search #Big_O_Time_O(log(min(N,M)))_Space_O(1)
// #AI_can_be_used_to_solve_the_task #2023_07_03_Time_293_ms_(75.96%)_Space_47.5_MB_(64.85%)

class Solution {
fun findMedianSortedArrays(nums1: IntArray, nums2: IntArray): Double {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package 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)
// #2023_07_03_Time_162_ms_(99.00%)_Space_36.6_MB_(79.10%)
// #Dynamic_Programming_I_Day_17 #Udemy_Strings #Top_Interview_150_Multidimensional_DP
// #Big_O_Time_O(n)_Space_O(n) #2023_07_03_Time_162_ms_(99.00%)_Space_36.6_MB_(79.10%)

class Solution {
fun longestPalindrome(s: String): String {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0006_zigzag_conversion

// #Medium #String #2023_07_03_Time_200_ms_(97.79%)_Space_37.3_MB_(91.71%)
// #Medium #String #Top_Interview_150_Array/String
// #2023_07_03_Time_200_ms_(97.79%)_Space_37.3_MB_(91.71%)

class Solution {
fun convert(s: String, numRows: Int): String {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0009_palindrome_number

// #Easy #Math #Udemy_Integers #2023_07_03_Time_217_ms_(95.34%)_Space_36.1_MB_(98.21%)
// #Easy #Math #Udemy_Integers #Top_Interview_150_Math
// #2023_07_03_Time_217_ms_(95.34%)_Space_36.1_MB_(98.21%)

class Solution {
fun isPalindrome(x: Int): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package 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)
// #Algorithm_II_Day_4_Two_Pointers #Top_Interview_150_Two_Pointers #Big_O_Time_O(n)_Space_O(1)
// #2023_07_03_Time_402_ms_(78.57%)_Space_52.1_MB_(77.51%)

class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0012_integer_to_roman

// #Medium #String #Hash_Table #Math #2023_07_03_Time_180_ms_(98.25%)_Space_37_MB_(82.89%)
// #Medium #String #Hash_Table #Math #Top_Interview_150_Array/String
// #2023_07_03_Time_180_ms_(98.25%)_Space_37_MB_(82.89%)

class Solution {
fun intToRoman(num: Int): String {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g0001_0100.s0013_roman_to_integer

// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table #Math
// #2023_07_03_Time_211_ms_(83.47%)_Space_36.9_MB_(91.66%)
// #Top_Interview_150_Array/String #2023_07_03_Time_211_ms_(83.47%)_Space_36.9_MB_(91.66%)

class Solution {
fun romanToInt(s: String): Int {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package g0001_0100.s0014_longest_common_prefix

// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #String #Level_2_Day_2_String
// #Udemy_Strings #2023_07_03_Time_154_ms_(89.70%)_Space_34.6_MB_(95.06%)
// #Udemy_Strings #Top_Interview_150_Array/String
// #2023_07_03_Time_154_ms_(89.70%)_Space_34.6_MB_(95.06%)

class Solution {
fun longestCommonPrefix(strs: Array<String>): String {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0015_3sum/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_03_Time_493_ms_(93.45%)_Space_53_MB_(93.97%)
// #Top_Interview_150_Two_Pointers #Big_O_Time_O(n*log(n))_Space_O(n^2)
// #2023_07_03_Time_493_ms_(93.45%)_Space_53_MB_(93.97%)

class Solution {
fun threeSum(nums: IntArray): List<List<Int>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_03_Time_155_ms_(95.24%)_Space_34.9_MB_(96.34%)
// #Top_Interview_150_Backtracking #Big_O_Time_O(4^n)_Space_O(n)
// #2023_07_03_Time_155_ms_(95.24%)_Space_34.9_MB_(96.34%)

class Solution {
fun letterCombinations(digits: String): List<String> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package 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)
// #2023_07_03_Time_144_ms_(96.28%)_Space_34.5_MB_(76.50%)
// #Algorithm_I_Day_5_Two_Pointers #Level_2_Day_3_Linked_List #Top_Interview_150_Linked_List
// #Big_O_Time_O(L)_Space_O(L) #2023_07_03_Time_144_ms_(96.28%)_Space_34.5_MB_(76.50%)

import com_github_leetcode.ListNode

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package 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)
// #2023_07_03_Time_137_ms_(88.76%)_Space_33.7_MB_(90.45%)
// #Data_Structure_I_Day_9_Stack_Queue #Udemy_Strings #Top_Interview_150_Stack
// #Big_O_Time_O(n)_Space_O(n) #2023_07_03_Time_137_ms_(88.76%)_Space_33.7_MB_(90.45%)

class Solution {
fun isValid(s: String): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package 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)
// #2023_07_03_Time_157_ms_(92.24%)_Space_35.7_MB_(68.58%)
// #Level_1_Day_3_Linked_List #Udemy_Linked_List #Top_Interview_150_Linked_List
// #Big_O_Time_O(m+n)_Space_O(m+n) #2023_07_03_Time_157_ms_(92.24%)_Space_35.7_MB_(68.58%)

import com_github_leetcode.ListNode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_03_Time_161_ms_(85.45%)_Space_37.3_MB_(66.18%)
// #Top_Interview_150_Backtracking #Big_O_Time_O(2^n)_Space_O(n)
// #2023_07_03_Time_161_ms_(85.45%)_Space_37.3_MB_(66.18%)

class Solution {
fun generateParenthesis(n: Int): List<String> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package 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))
// #Divide_and_Conquer #Merge_Sort #Top_Interview_150_Divide_and_Conquer
// #Big_O_Time_O(k*n*log(k))_Space_O(log(k))
// #2023_07_03_Time_198_ms_(93.77%)_Space_37.6_MB_(97.03%)

import com_github_leetcode.ListNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package 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)
// #Udemy_Linked_List #Top_Interview_150_Linked_List #Big_O_Time_O(n)_Space_O(k)
// #2023_07_03_Time_189_ms_(67.03%)_Space_36.7_MB_(71.43%)

import com_github_leetcode.ListNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g0001_0100.s0026_remove_duplicates_from_sorted_array

// #Easy #Top_Interview_Questions #Array #Two_Pointers #Udemy_Two_Pointers
// #2023_07_03_Time_249_ms_(67.38%)_Space_42_MB_(57.99%)
// #Top_Interview_150_Array/String #2023_07_03_Time_249_ms_(67.38%)_Space_42_MB_(57.99%)

class Solution {
fun removeDuplicates(nums: IntArray): Int {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0027_remove_element/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0027_remove_element

// #Easy #Array #Two_Pointers #2023_07_03_Time_162_ms_(76.44%)_Space_34.8_MB_(70.69%)
// #Easy #Array #Two_Pointers #Top_Interview_150_Array/String
// #2023_07_03_Time_162_ms_(76.44%)_Space_34.8_MB_(70.69%)

class Solution {
fun removeElement(nums: IntArray, `val`: Int): Int {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package g0001_0100.s0028_find_the_index_of_the_first_occurrence_in_a_string

// #Easy #Top_Interview_Questions #String #Two_Pointers #String_Matching
// #Programming_Skills_II_Day_1 #2023_07_03_Time_126_ms_(97.58%)_Space_34.2_MB_(76.09%)
// #Programming_Skills_II_Day_1 #Top_Interview_150_Array/String
// #2023_07_03_Time_126_ms_(97.58%)_Space_34.2_MB_(76.09%)

class Solution {
fun strStr(haystack: String, needle: String): Int {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g0001_0100.s0030_substring_with_concatenation_of_all_words

// #Hard #String #Hash_Table #Sliding_Window
// #Hard #String #Hash_Table #Sliding_Window #Top_Interview_150_Sliding_Window
// #2023_07_03_Time_182_ms_(100.00%)_Space_37.9_MB_(100.00%)

class Solution {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package 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)
// #Udemy_Binary_Search #Top_Interview_150_Binary_Search #Big_O_Time_O(log_n)_Space_O(1)
// #2023_07_05_Time_151_ms_(93.77%)_Space_34.5_MB_(94.08%)

class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package 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)
// #2023_07_05_Time_174_ms_(100.00%)_Space_37.8_MB_(71.70%)
// #Algorithm_II_Day_1_Binary_Search #Binary_Search_I_Day_5 #Top_Interview_150_Binary_Search
// #Big_O_Time_O(log_n)_Space_O(1) #2023_07_05_Time_174_ms_(100.00%)_Space_37.8_MB_(71.70%)

class Solution constructor() {
fun searchRange(nums: IntArray, target: Int): IntArray {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package 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)
// #Binary_Search_I_Day_2 #Top_Interview_150_Binary_Search #Big_O_Time_O(log_n)_Space_O(1)
// #2023_07_05_Time_159_ms_(93.03%)_Space_36.7_MB_(95.90%)

class Solution {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/g0001_0100/s0036_valid_sudoku/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g0001_0100.s0036_valid_sudoku

// #Medium #Top_Interview_Questions #Array #Hash_Table #Matrix #Data_Structure_I_Day_5_Array
// #2023_07_05_Time_181_ms_(95.15%)_Space_40_MB_(62.78%)
// #Top_Interview_150_Matrix #2023_07_05_Time_181_ms_(95.15%)_Space_40_MB_(62.78%)

class Solution {
private var j1 = 0
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0039_combination_sum/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_05_Time_226_ms_(88.89%)_Space_38.1_MB_(94.95%)
// #Top_Interview_150_Backtracking #Big_O_Time_O(2^n)_Space_O(n+2^n)
// #2023_07_05_Time_226_ms_(88.89%)_Space_38.1_MB_(94.95%)

class Solution {
fun combinationSum(candidates: IntArray, target: Int): List<List<Int>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_05_Time_189_ms_(99.37%)_Space_39.4_MB_(81.90%)
// #Top_Interview_150_Array/String #Big_O_Time_O(n)_Space_O(1)
// #2023_07_05_Time_189_ms_(99.37%)_Space_39.4_MB_(81.90%)

class Solution {
fun trap(height: IntArray): Int {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0045_jump_game_ii/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_05_Time_208_ms_(93.37%)_Space_38.2_MB_(94.48%)
// #Top_Interview_150_Array/String #Big_O_Time_O(n)_Space_O(1)
// #2023_07_05_Time_208_ms_(93.37%)_Space_38.2_MB_(94.48%)

class Solution {
fun jump(nums: IntArray): Int {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/g0001_0100/s0046_permutations/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package 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!)
// #Udemy_Backtracking/Recursion #Top_Interview_150_Backtracking #Big_O_Time_O(n*n!)_Space_O(n+n!)
// #2023_07_05_Time_188_ms_(99.00%)_Space_37.4_MB_(88.94%)

class Solution {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0048_rotate_image/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_05_Time_160_ms_(90.11%)_Space_35_MB_(84.07%)
// #Top_Interview_150_Matrix #Big_O_Time_O(n^2)_Space_O(1)
// #2023_07_05_Time_160_ms_(90.11%)_Space_35_MB_(84.07%)

class Solution {
fun rotate(matrix: Array<IntArray>) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0049_group_anagrams/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_05_Time_308_ms_(96.34%)_Space_43.3_MB_(81.41%)
// #Top_Interview_150_Hashmap #Big_O_Time_O(n*k_log_k)_Space_O(n)
// #2023_07_05_Time_308_ms_(96.34%)_Space_43.3_MB_(81.41%)

class Solution {
fun groupAnagrams(strs: Array<String>): List<List<String>> {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/g0001_0100/s0050_powx_n/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g0001_0100.s0050_powx_n

// #Medium #Top_Interview_Questions #Math #Recursion #Udemy_Integers
// #Medium #Top_Interview_Questions #Math #Recursion #Udemy_Integers #Top_Interview_150_Math
// #2023_07_05_Time_172_ms_(38.68%)_Space_34.8_MB_(66.04%)

@Suppress("NAME_SHADOWING")
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0052_n_queens_ii/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0052_n_queens_ii

// #Hard #Backtracking #2023_07_10_Time_128_ms_(97.56%)_Space_32.7_MB_(92.68%)
// #Hard #Backtracking #Top_Interview_150_Backtracking #Top_Interview_150_Kadane's_Algorithm
// #2023_07_10_Time_128_ms_(97.56%)_Space_32.7_MB_(92.68%)

class Solution {
fun totalNQueens(n: Int): Int {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/g0001_0100/s0054_spiral_matrix/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package g0001_0100.s0054_spiral_matrix

// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Matrix #Simulation
// #Programming_Skills_II_Day_8 #Level_2_Day_1_Implementation/Simulation #Udemy_2D_Arrays/Matrix
// #2023_07_10_Time_132_ms_(95.12%)_Space_33.5_MB_(93.17%)
// #Top_Interview_150_Matrix #2023_07_10_Time_132_ms_(95.12%)_Space_33.5_MB_(93.17%)

class Solution {
fun spiralOrder(matrix: Array<IntArray>): List<Int> {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0055_jump_game/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_10_Time_332_ms_(89.35%)_Space_39_MB_(96.44%)
// #Top_Interview_150_Array/String #Big_O_Time_O(n)_Space_O(1)
// #2023_07_10_Time_332_ms_(89.35%)_Space_39_MB_(96.44%)

class Solution {
fun canJump(nums: IntArray): Boolean {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0056_merge_intervals/Solution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package 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) #2023_07_10_Time_334_ms_(80.67%)_Space_43.7_MB_(78.81%)
// #Top_Interview_150_Intervals #Big_O_Time_O(n_log_n)_Space_O(n)
// #2023_07_10_Time_334_ms_(80.67%)_Space_43.7_MB_(78.81%)

class Solution {
fun merge(intervals: Array<IntArray>): Array<IntArray> {
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/g0001_0100/s0057_insert_interval/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package g0001_0100.s0057_insert_interval

// #Medium #Array #Level_2_Day_17_Interval #2023_07_10_Time_249_ms_(75.63%)_Space_40.4_MB_(60.87%)
// #Medium #Array #Level_2_Day_17_Interval #Top_Interview_150_Intervals
// #2023_07_10_Time_249_ms_(75.63%)_Space_40.4_MB_(60.87%)

class Solution {
fun insert(intervals: Array<IntArray>, newInterval: IntArray): Array<IntArray> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g0001_0100.s0058_length_of_last_word

// #Easy #String #Programming_Skills_II_Day_6 #Udemy_Arrays
// #Easy #String #Programming_Skills_II_Day_6 #Udemy_Arrays #Top_Interview_150_Array/String
// #2023_07_10_Time_135_ms_(93.67%)_Space_34.3_MB_(94.69%)

class Solution {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/g0001_0100/s0061_rotate_list/Solution.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g0001_0100.s0061_rotate_list

// #Medium #Two_Pointers #Linked_List #Programming_Skills_II_Day_16 #Udemy_Linked_List
// #2023_07_10_Time_160_ms_(92.22%)_Space_36.2_MB_(63.33%)
// #Top_Interview_150_Linked_List #2023_07_10_Time_160_ms_(92.22%)_Space_36.2_MB_(63.33%)

import com_github_leetcode.ListNode

Expand Down
Loading