id/email
password
forgot password
about | help | done | prefs | create account
CodingBat code practice

Java > Array-2 > tripleUp
prev  |  next  |  chance

Return true if the array contains, somewhere, three increasing adjacent numbers like .... 4, 5, 6, ... or 23, 24, 25.

tripleUp({1, 4, 5, 6, 2}) → true
tripleUp({1, 2, 3}) → true
tripleUp({1, 2, 4}) → false

...Save, Compile, Run

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Array-2

Forget It! -- delete my code for this problem 263.0

Copyright Nick Parlante 2006-10 - privacy