| about | help | done | prefs | create account |
Java > Array-1 > fix23
prev | next | chance
| Given an int array length 3, if there is a 2 in the array immediately followed by a 3, set the 3 element to 0. Return the changed array.
fix23({1, 2, 3}) → {1, 2, 0} fix23({2, 3, 5}) → {2, 0, 5} fix23({1, 2, 1}) → {1, 2, 1} ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 148.0
Copyright Nick Parlante 2006-10 - privacy