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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3701_3800.s3743_maximize_cyclic_partition_score;

// #Hard #Array #Dynamic_Programming #Weekly_Contest_475 #Principal
// #Hard #Array #Dynamic_Programming #Principal #Weekly_Contest_475
// #2026_04_26_Time_40_ms_(96.15%)_Space_120.45_MB_(7.69%)

public class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3701_3800.s3772_maximum_subgraph_score_in_a_tree;

// #Hard #Array #Dynamic_Programming #Tree #Senior_Staff #Weekly_Contest_479 #Depth_First_Search
// #Hard #Array #Dynamic_Programming #Depth_First_Search #Tree #Senior_Staff #Weekly_Contest_479
// #2026_05_08_Time_35_ms_(100.00%)_Space_279.46_MB_(74.36%)

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3701_3800.s3786_total_sum_of_interaction_cost_in_tree_groups;

// #Hard #Array #Tree #Senior_Staff #Weekly_Contest_481 #Depth_First_Search
// #Hard #Array #Depth_First_Search #Tree #Senior_Staff #Weekly_Contest_481
// #2026_05_22_Time_82_ms_(90.67%)_Space_296.78_MB_(21.33%)

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# #Medium #2026_06_09_Time_290_ms_(87.69%)_Space_0.0_MB_(100.00%)
# Write your MySQL query statement below
# #Medium #2026_06_09_Time_290_ms_(87.69%)_Space_0.0_MB_(100.00%)
WITH user_selection AS
(SELECT
user_id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g3801_3900.s3812_minimum_edge_toggles_on_a_tree;

// #Hard #Sorting #Tree #Topological_Sort #Senior_Staff #Depth_First_Search #Biweekly_Contest_174
// #Graph_Theory #2026_06_09_Time_89_ms_(86.67%)_Space_303.92_MB_(28.33%)
// #Hard #Sorting #Depth_First_Search #Tree #Topological_Sort #Senior_Staff #Graph_Theory
// #Biweekly_Contest_174 #2026_06_09_Time_89_ms_(86.67%)_Space_303.92_MB_(28.33%)

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3801_3900.s3820_pythagorean_distance_nodes_in_a_tree;

// #Medium #Tree #Staff #Weekly_Contest_486 #Breadth_First_Search
// #Medium #Breadth_First_Search #Tree #Staff #Weekly_Contest_486
// #2026_06_09_Time_96_ms_(90.83%)_Space_234.88_MB_(70.83%)

import java.util.ArrayDeque;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# #Hard #2026_07_21_Time_367_ms_(16.77%)_Space_0.0_MB_(100.00%)
# Write your MySQL query statement below
# #Hard #2026_07_21_Time_367_ms_(16.77%)_Space_0.0_MB_(100.00%)
WITH distinct_activity AS (
SELECT DISTINCT
user_id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package g3801_3900.s3841_palindromic_path_queries_in_a_tree;

// #Hard #Array #String #Tree #Bit_Manipulation #Divide_and_Conquer #Segment_Tree
// #Biweekly_Contest_176 #Principal #Depth_First_Search
// #Hard #Array #String #Depth_First_Search #Tree #Bit_Manipulation #Divide_and_Conquer
// #Segment_Tree #Principal #Biweekly_Contest_176
// #2026_07_22_Time_65_ms_(100.00%)_Space_185.61_MB_(96.67%)

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3801_3900.s3873_maximum_points_activated_with_one_addition;

// #Hard #Array #Hash_Table #Senior_Staff #Weekly_Contest_493 #Union_Find
// #Hard #Array #Hash_Table #Union_Find #Senior_Staff #Weekly_Contest_493
// #2026_07_28_Time_36_ms_(97.50%)_Space_210.60_MB_(92.50%)

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3801_3900.s3887_incremental_even_weighted_cycle_queries;

// #Hard #Senior_Staff #Weekly_Contest_495 #Union_Find #Graph_Theory
// #Hard #Union_Find #Senior_Staff #Graph_Theory #Weekly_Contest_495
// #2026_08_13_Time_18_ms_(100.00%)_Space_262.39_MB_(65.96%)

public class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3801_3900.s3898_find_the_degree_of_each_vertex;

// #Easy #Array #Matrix #Mid_Level #Graph_Theory #Weekly_Contest_497
// #Easy #Array #Matrix #Mid_Level #Weekly_Contest_497 #Graph_Theory
// #2026_08_13_Time_1_ms_(100.00%)_Space_48.48_MB_(42.57%)

public class Solution {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3901_4000.s3901_good_subsequence_queries;

// #Hard #Array #Math #Segment_Tree #Number_Theory #Weekly_Contest_497 #Principal
// #Hard #Array #Math #Segment_Tree #Number_Theory #Principal #Weekly_Contest_497
// #2026_09_17_Time_20_ms_(100.00%)_Space_133.27_MB_(34.15%)

public class Solution {
Expand Down Expand Up @@ -36,7 +36,6 @@ public int countGoodSubseq(int[] nums, int p, int[][] queries) {
if (!wasValid && isValid) {
validCount++;
}

// Update the original array to keep track of the old values
nums[idx] = value;
// Point update for the Iterative Tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ The term `gcd(a, b)` denotes the **greatest common divisor** of `a` and `b`.
| 0 | `[0, 3]` | Update `nums[0]` to `3` | `[3, 8, 12, 16]` | No, as no subsequence has GCD exactly `p = 2` |
| 1 | `[2, 6]` | Update `nums[2]` to `6` | `[3, 8, 6, 16]` | Yes, subsequence `[8, 6]` has GCD exactly `p = 2` |


Thus, the answer is 1.

**Example 2:**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package g3901_4000.s3905_multi_source_flood_fill;

// #Medium #Array #Matrix #Staff #Weekly_Contest_498 #Breadth_First_Search
// #Medium #Array #Breadth_First_Search #Matrix #Staff #Weekly_Contest_498
// #2026_09_17_Time_33_ms_(100.00%)_Space_90.55_MB_(100.00%)

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package g3901_4000.s3910_count_connected_subgraphs_with_even_node_sum;

// #Hard #Array #Bit_Manipulation #Enumeration #Senior_Staff #Breadth_First_Search
// #Biweekly_Contest_181 #Depth_First_Search #Union_Find #Graph_Theory
// #2026_09_17_Time_3_ms_(98.31%)_Space_46.18_MB_(100.00%)
// #Hard #Array #Depth_First_Search #Breadth_First_Search #Bit_Manipulation #Union_Find #Enumeration
// #Senior_Staff #Graph_Theory #Biweekly_Contest_181
// #2026_09_18_Time_2_ms_(100.00%)_Space_46.57_MB_(85.71%)

public class Solution {
private long[] graph;
Expand Down
Loading