We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Data Structures
- Java 2D Array
- Discussions
Java 2D Array
Java 2D Array
Sort by
recency
|
652 Discussions
|
Please Login in order to post a comment
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.regex.*;
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
}
Pasted only the logic.
I don't know why they use List> instead of Integer[][]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List;
public class TwoDArray {
}
I think the only 'trick' here is to realize the max might be negative, so initialize the lastSoFar variable to a large negative number like -999999999. (or better yet, Integer.MIN_VALUE)