id/email
password
forgot password
about | help | done | prefs | create account
JavaBat java practice problems

Array-1 > commonEnd
prev  |  next  |  chance

Given 2 arrays of ints, a and b, return true if they have the same first element or they have the same last element. Both arrays will be length 1 or more.

commonEnd({1, 2, 3}, {7, 3}) → true
commonEnd({1, 2, 3}, {7, 3, 2}) → false
commonEnd({1, 2, 3}, {1, 3}) → true

...Save, Compile, Run

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


prev  |  next  |  chance   |  JavaBat  >  Array-1

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

Copyright Nick Parlante 2006-09 - privacy