File tree Expand file tree Collapse file tree 11 files changed +48
-61
lines changed
s0114_flatten_binary_tree_to_linked_list
s0121_best_time_to_buy_and_sell_stock
s0124_binary_tree_maximum_path_sum
s0128_longest_consecutive_sequence
s0131_palindrome_partitioning
s0138_copy_list_with_random_pointer
s0142_linked_list_cycle_ii Expand file tree Collapse file tree 11 files changed +48
-61
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0114_flatten_binary_tree_to_linked_list
22
33// #Medium #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree #Stack #Linked_List
44// #Udemy_Linked_List #Top_Interview_150_Binary_Tree_General #Big_O_Time_O(N)_Space_O(N)
5- // #2024_03_19_Time_0_ms_ (100.00%)_Space_3.1_MB_(5.75 %)
5+ // #2025_05_07_Time_0_ms_ (100.00%)_Space_4.88_MB_(66.49 %)
66
77type TreeNode struct {
88 Val int
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package s0121_best_time_to_buy_and_sell_stock
33// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Dynamic_Programming
44// #Data_Structure_I_Day_3_Array #Dynamic_Programming_I_Day_7 #Level_1_Day_5_Greedy #Udemy_Arrays
55// #Top_Interview_150_Array/String #Big_O_Time_O(N)_Space_O(1)
6- // #2024_03_19_Time_76_ms_(99.34%)_Space_7.4_MB_(98.91 %)
6+ // #2025_05_07_Time_0_ms_(100.00%)_Space_9.74_MB_(72.19 %)
77
88func maxProfit (prices []int ) int {
99 maxProfit := 0
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0124_binary_tree_maximum_path_sum
22
33// #Hard #Top_100_Liked_Questions #Top_Interview_Questions #Dynamic_Programming #Depth_First_Search
44// #Tree #Binary_Tree #Udemy_Tree_Stack_Queue #Top_Interview_150_Binary_Tree_General
5- // #Big_O_Time_O(N)_Space_O(N) #2024_03_19_Time_10_ms_(89.68%)_Space_7.8_MB_(94.84 %)
5+ // #Big_O_Time_O(N)_Space_O(N) #2025_05_07_Time_0_ms_(100.00%)_Space_10.08_MB_(59.76 %)
66
77type TreeNode struct {
88 Val int
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0128_longest_consecutive_sequence
22
33// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Array #Hash_Table #Union_Find
44// #Top_Interview_150_Hashmap #Big_O_Time_O(N_log_N)_Space_O(1)
5- // #2024_03_19_Time_54_ms_ (99.84%)_Space_8.9_MB_(93 .24%)
5+ // #2025_05_07_Time_4_ms_ (99.84%)_Space_10.05_MB_(99 .24%)
66
77import "sort"
88
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0131_palindrome_partitioning
22
33// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Dynamic_Programming
44// #Backtracking #Big_O_Time_O(N*2^N)_Space_O(2^N*N)
5- // #2024_03_19_Time_221_ms_(97.16%)_Space_19.1_MB_(89.91 %)
5+ // #2025_05_07_Time_18_ms_(92.42%)_Space_27.26_MB_(16.97 %)
66
77func partition (s string ) [][]string {
88 var res [][]string
Original file line number Diff line number Diff line change 11package s0136_single_number
22
33// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Array #Bit_Manipulation
4- // #Data_Structure_II_Day_1_Array #Algorithm_I_Day_14_Bit_Manipulation #Udemy_Integers
5- // #Top_Interview_150_Bit_Manipulation #Big_O_Time_O(N)_Space_O(1)
6- // #2024_03_19_Time_8_ms_(95.49%)_Space_6.1_MB_(77.03 %)
4+ // #LeetCode_75_Bit_Manipulation #Data_Structure_II_Day_1_Array
5+ // #Algorithm_I_Day_14_Bit_Manipulation #Udemy_Integers #Top_Interview_150_Bit_Manipulation
6+ // #Big_O_Time_O(N)_Space_O(1) #2025_05_07_Time_0_ms_(100.00%)_Space_7.82_MB_(83.54 %)
77
88func singleNumber (nums []int ) int {
99 res := nums [0 ]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0138_copy_list_with_random_pointer
22
33// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #Hash_Table #Linked_List
44// #Programming_Skills_II_Day_14 #Udemy_Linked_List #Top_Interview_150_Linked_List
5- // #Big_O_Time_O(N)_Space_O(N) #2024_03_19_Time_2_ms_(70.11%)_Space_3.6_MB_(96.36 %)
5+ // #Big_O_Time_O(N)_Space_O(N) #2025_05_07_Time_0_ms_(100.00%)_Space_5.44_MB_(28.63 %)
66
77type Node struct {
88 Val int
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package s0139_word_break
33// #Medium #Top_100_Liked_Questions #Top_Interview_Questions #String #Hash_Table
44// #Dynamic_Programming #Trie #Memoization #Algorithm_II_Day_15_Dynamic_Programming
55// #Dynamic_Programming_I_Day_9 #Udemy_Dynamic_Programming #Top_Interview_150_1D_DP
6- // #Big_O_Time_O(M+max*N)_Space_O(M+N+max) #2024_03_20_Time_0_ms_ (100.00%)_Space_2.4_MB_(16.32 %)
6+ // #Big_O_Time_O(M+max*N)_Space_O(M+N+max) #2025_05_07_Time_0_ms_ (100.00%)_Space_4.24_MB_(37.18 %)
77
88func wordBreak (s string , wordDict []string ) bool {
99 if len (wordDict ) == 0 {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package s0141_linked_list_cycle
22
33// #Easy #Top_100_Liked_Questions #Top_Interview_Questions #Hash_Table #Two_Pointers #Linked_List
44// #Data_Structure_I_Day_7_Linked_List #Udemy_Linked_List #Top_Interview_150_Linked_List
5- // #Big_O_Time_O(N)_Space_O(1) #2024_03_20_Time_7_ms_(69.12%)_Space_4.6_MB_(82 .42%)
5+ // #Big_O_Time_O(N)_Space_O(1) #2025_05_07_Time_4_ms_(76.55%)_Space_6.23_MB_(51 .42%)
66
77type ListNode struct {
88 Val int
You can’t perform that action at this time.
0 commit comments