| about | help | done | prefs | create account |
Array-2 > matchUp
prev | next | chance
| Given arrays nums1 and nums2 of the same length, for every element in nums1, consider the corresponding element in nums2 (at the same index). Return the count of the number of times that the two elements differ by 2 or less, but are not equal.
matchUp({1, 2, 3}, {2, 3, 10}) → 2 matchUp({1, 2, 3}, {2, 3, 5}) → 3 matchUp({1, 2, 3}, {2, 3, 3}) → 2 ...Save, Compile, Run See Also: Example Code Java help: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 242.0
Copyright Nick Parlante 2006-09 - privacy