Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 04dad8c

Browse files
Update ReduceArray.java
1 parent dd3a805 commit 04dad8c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎ApplyingCollections/ReduceArray.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
/*There is an array of N elements. Perform the following operation until there are only two elements left in the array.
1+
/*
2+
There is an array of N elements. Perform the following operation until there are only two elements left in the array.
3+
Remove the largest and second largest element from the array and insert their absolute difference back in the array.
4+
25
Input format
36
There are two lines of input.
47
@@ -21,7 +24,7 @@
2124
1 <= N <= 10^5
2225
2326
1 <= A[i] <= 10^9
24-
Remove the largest and second largest element from the array and insert their absolute difference back in the array.
27+
2528
*/
2629

2730
import java.util.*;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /