We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6f87cf commit 7c52280Copy full SHA for 7c52280
src/main/java/g3501_3600/s3510_minimum_pair_removal_to_sort_array_ii/Solution.java
@@ -1,7 +1,7 @@
1
package g3501_3600.s3510_minimum_pair_removal_to_sort_array_ii;
2
3
// #Hard #Array #Hash_Table #Heap_Priority_Queue #Simulation #Linked_List #Ordered_Set
4
-// #Doubly_Linked_List #2025_04_29_Time_274_ms_(98.94%)_Space_70.73_MB_(69.15%)
+// #Doubly_Linked_List #2025_04_29_Time_278_ms_(98.94%)_Space_70.90_MB_(68.88%)
5
6
import java.util.Arrays;
7
@@ -98,9 +98,6 @@ private int getRes(
98
}
99
100
private void modify(long[] segment, int idx, long num) {
101
- if (segment[idx] == num) {
102
- return;
103
- }
104
segment[idx] = num;
105
while (idx != 0) {
106
idx = (idx - 1) / 2;
0 commit comments