Kotlinlearncs.online LogoJava
Return to List

Solve: Front Piece

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given a non-null int[] of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever elements are present.

int[] frontPiece(int[] values) {
return null; // You may need to remove this starter code

Related Lessons

Stuck? You may find these lessons helpful: