| about | help | done | prefs | create account |
Java > AP-1 > matchUp
prev | next | chance
| Given 2 arrays that are the same length containing strings, compare the 1st string in one array to the 1st string in the other array, the 2nd to the 2nd and so on. Count the number of times that the 2 strings are non-empty and start with the same char. The strings may be any length, including 0.
matchUp({"aa", "bb", "cc"}, {"aaa", "xx", "bb"}) → 1 matchUp({"aa", "bb", "cc"}, {"aaa", "b", "bb"}) → 2 matchUp({"aa", "bb", "cc"}, {"", "", "ccc"}) → 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
New just for fun
Random User Progress Graphs
Random Epic Graphs
236.0
Copyright Nick Parlante 2006-11 - privacy