File tree 17 files changed +51
-54
lines changed
s0167_two_sum_ii_input_array_is_sorted
s0172_factorial_trailing_zeroes
s0173_binary_search_tree_iterator
s0188_best_time_to_buy_and_sell_stock_iv
s0199_binary_tree_right_side_view
s0201_bitwise_and_of_numbers_range
s0209_minimum_size_subarray_sum
s0211_design_add_and_search_words_data_structure
s0219_contains_duplicate_ii
17 files changed +51
-54
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 2
2
3
3
// #Medium #Array #Binary_Search #Two_Pointers #Algorithm_I_Day_3_Two_Pointers
4
4
// #Binary_Search_I_Day_7 #Top_Interview_150_Two_Pointers
5
- // #2022_06_25_Time_1_ms_(99.21%)_Space_50.3_MB_(31.33 %)
5
+ // #2025_03_09_Time_2_ms_(92.62%)_Space_47.15_MB_(64.95 %)
6
6
7
7
public class Solution {
8
8
public int [] twoSum (int [] numbers , int target ) {
Original file line number Diff line number Diff line change 1
1
package g0101_0200 .s0172_factorial_trailing_zeroes ;
2
2
3
3
// #Medium #Top_Interview_Questions #Math #Udemy_Integers #Top_Interview_150_Math
4
- // #2022_06_26_Time_1_ms_(85.61%)_Space_42.1_MB_(7.61 %)
4
+ // #2025_03_09_Time_0_ms_(100.00%)_Space_40.78_MB_(46.99 %)
5
5
6
6
public class Solution {
7
7
public int trailingZeroes (int n ) {
Original file line number Diff line number Diff line change 2
2
3
3
// #Medium #Tree #Binary_Tree #Stack #Design #Binary_Search_Tree #Iterator
4
4
// #Data_Structure_II_Day_17_Tree #Programming_Skills_II_Day_16 #Level_2_Day_9_Binary_Search_Tree
5
- // #Top_Interview_150_Binary_Tree_General #2022_06_26_Time_18_ms_(84.18%)_Space_52.2_MB_(23.01 %)
5
+ // #Top_Interview_150_Binary_Tree_General #2025_03_09_Time_15_ms_(100.00%)_Space_48.60_MB_(18.83 %)
6
6
7
7
import com_github_leetcode .TreeNode ;
8
8
Original file line number Diff line number Diff line change 1
1
package g0101_0200 .s0188_best_time_to_buy_and_sell_stock_iv ;
2
2
3
3
// #Hard #Array #Dynamic_Programming #Top_Interview_150_Multidimensional_DP
4
- // #2022_06_27_Time_1_ms_(100.00%)_Space_42.7_MB_(47.38 %)
4
+ // #2025_03_09_Time_1_ms_(99.73%)_Space_41.76_MB_(82.48 %)
5
5
6
6
public class Solution {
7
7
public int maxProfit (int k , int [] prices ) {
Original file line number Diff line number Diff line change 2
2
3
3
// #Easy #Top_Interview_Questions #Bit_Manipulation #Divide_and_Conquer
4
4
// #Algorithm_I_Day_14_Bit_Manipulation #Udemy_Bit_Manipulation #Top_Interview_150_Bit_Manipulation
5
- // #2022_06_27_Time_1_ms_(98.66 %)_Space_41.9_MB_(81.78 %)
5
+ // #2025_03_09_Time_0_ms_(100.00 %)_Space_41.94_MB_(43.56 %)
6
6
7
7
public class Solution {
8
8
// you need treat n as an unsigned value
Original file line number Diff line number Diff line change 2
2
3
3
// #Easy #Top_Interview_Questions #Bit_Manipulation #Algorithm_I_Day_13_Bit_Manipulation
4
4
// #Programming_Skills_I_Day_2_Operator #Udemy_Bit_Manipulation #Top_Interview_150_Bit_Manipulation
5
- // #2022_06_28_Time_1_ms_(84.87 %)_Space_41.8_MB_(10.40 %)
5
+ // #2025_03_09_Time_0_ms_(100.00 %)_Space_41.10_MB_(13.52 %)
6
6
7
7
public class Solution {
8
8
public int hammingWeight (int n ) {
Original file line number Diff line number Diff line change 2
2
3
3
// #Medium #Top_100_Liked_Questions #Depth_First_Search #Breadth_First_Search #Tree #Binary_Tree
4
4
// #Data_Structure_II_Day_16_Tree #Level_2_Day_15_Tree #Top_Interview_150_Binary_Tree_BFS
5
- // #2022_06_28_Time_1_ms_(94.57 %)_Space_42.9_MB_(41.09 %)
5
+ // #2025_03_09_Time_0_ms_(100.00 %)_Space_42.21_MB_(42.76 %)
6
6
7
7
import com_github_leetcode .TreeNode ;
8
8
import java .util .ArrayList ;
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0201_bitwise_and_of_numbers_range ;
2
2
3
3
// #Medium #Bit_Manipulation #Algorithm_II_Day_19_Bit_Manipulation
4
- // #Top_Interview_150_Bit_Manipulation #2022_06_28_Time_8_ms_(74.15%)_Space_44.4_MB_(39.54 %)
4
+ // #Top_Interview_150_Bit_Manipulation #2025_03_09_Time_3_ms_(100.00%)_Space_43.70_MB_(94.56 %)
5
5
6
6
public class Solution {
7
7
private static final int [] MASKS =
Original file line number Diff line number Diff line change 2
2
3
3
// #Easy #Top_Interview_Questions #Hash_Table #Math #Two_Pointers #Algorithm_II_Day_21_Others
4
4
// #Programming_Skills_I_Day_4_Loop #Level_2_Day_1_Implementation/Simulation
5
- // #Top_Interview_150_Hashmap #2022_06_28_Time_1_ms_(98.59%)_Space_41_MB_(64.25 %)
5
+ // #Top_Interview_150_Hashmap #2025_03_09_Time_0_ms_(100.00%)_Space_40.92_MB_(38.98 %)
6
6
7
7
public class Solution {
8
8
public boolean isHappy (int n ) {
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0205_isomorphic_strings ;
2
2
3
3
// #Easy #String #Hash_Table #Level_1_Day_2_String #Top_Interview_150_Hashmap
4
- // #2022_06_28_Time_2_ms_ (99.97%)_Space_43.3_MB_(32.68 %)
4
+ // #2025_03_09_Time_2_ms_ (99.18%)_Space_42.83_MB_(16.73 %)
5
5
6
6
public class Solution {
7
7
public boolean isIsomorphic (String s , String t ) {
Original file line number Diff line number Diff line change 2
2
3
3
// #Medium #Array #Binary_Search #Prefix_Sum #Sliding_Window #Algorithm_II_Day_5_Sliding_Window
4
4
// #Binary_Search_II_Day_1 #Top_Interview_150_Sliding_Window
5
- // #2022_06_28_Time_1_ms_(100.00%)_Space_50.1_MB_(11.60 %)
5
+ // #2025_03_09_Time_1_ms_(99.76%)_Space_58.08_MB_(66.32 %)
6
6
7
7
public class Solution {
8
8
public int minSubArrayLen (int target , int [] nums ) {
Original file line number Diff line number Diff line change 2
2
3
3
// #Medium #Top_Interview_Questions #Depth_First_Search #Breadth_First_Search #Graph
4
4
// #Topological_Sort #Level_2_Day_11_Graph/BFS/DFS #Top_Interview_150_Graph_General
5
- // #2022_06_28_Time_13_ms_(35.17%)_Space_50.7_MB_(22.84 %)
5
+ // #2025_03_09_Time_4_ms_(91.07%)_Space_45.55_MB_(91.17 %)
6
6
7
7
import java .util .ArrayList ;
8
8
import java .util .HashMap ;
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0211_design_add_and_search_words_data_structure ;
2
2
3
3
// #Medium #String #Depth_First_Search #Design #Trie #Top_Interview_150_Trie
4
- // #2023_01_06_Time_308_ms_ (99.46%)_Space_284.7_MB_(13.25 %)
4
+ // #2025_03_09_Time_156_ms_ (99.85%)_Space_100.34_MB_(44.69 %)
5
5
6
6
public class WordDictionary {
7
7
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0212_word_search_ii ;
2
2
3
3
// #Hard #Top_Interview_Questions #Array #String #Matrix #Backtracking #Trie #Top_Interview_150_Trie
4
- // #2022_07_02_Time_21_ms_ (99.42%)_Space_44.1_MB_ (67.33 %)
4
+ // #2025_03_09_Time_17_ms_ (99.16%)_Space_45.08_MB_ (67.05 %)
5
5
6
6
import java .util .ArrayList ;
7
7
import java .util .Collections ;
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0212_word_search_ii ;
2
2
3
- // #Hard #Top_Interview_Questions #Array #String #Matrix #Backtracking #Trie #Top_Interview_150_Trie
4
- // #2022_07_02_Time_21_ms_(99.42%)_Space_44.1_MB_(67.33%)
5
-
6
3
@ SuppressWarnings ("java:S1104" )
7
4
public class Tree {
8
5
private Tree [] children ;
Original file line number Diff line number Diff line change 1
1
package g0201_0300 .s0219_contains_duplicate_ii ;
2
2
3
3
// #Easy #Array #Hash_Table #Sliding_Window #Top_Interview_150_Hashmap
4
- // #2022_07_02_Time_15_ms_(99.09%)_Space_56_MB_(82.82 %)
4
+ // #2025_03_09_Time_15_ms_(98.00%)_Space_57.98_MB_(48.14 %)
5
5
6
6
import java .util .HashMap ;
7
7
import java .util .Map ;
You can’t perform that action at this time.
0 commit comments