Kotlinlearncs.online LogoJava
Return to List

Solve: Common End

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given two IntArrays, return true if they have the same first element or they have the same last element. Both arrays will have length at least one.

fun commonEnd(
first: IntArray,
last: IntArray,
): Boolean {
return false // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: