Status: Not Started
- Scratchpad.java
- Unit Test
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
Consecutive Values
Unit Test
1
2
public static boolean consecutive(int[][] arr)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
History
Video
Download
About
W
Test Cases
x/x
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
This student is viewing this assignment in English. View this page in English?
7 points
Given a 2D array of integer (length > 0), return true if any two consecutive values are the same. A consecutive value is either two values from the same row in neighboring columns, or the last column in one row compared to the first column in the next row.
Example:
consecutive([[1, 2, 3], [3, 4, 5], [6, 7, 8]]) --> true
consecutive([[1, 1, 2], [3, 4, 5], [6, 7, 8]]) --> true
consecutive([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) --> false
Reset Code
Upload an image
Upload from your computer
Or paste a link here
Slides and Notes
No slides available for this video
About
Java Practice (main)
Java Version 1.8.0_222