#31. frontPiece
frontPiece
Background
Description
Given an int array 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.
Format
Input
Output
Samples
[1 2 3]
[1, 2]
[1 2]
[1, 2]
[1]
[1]
Limitation
1s, 1024KiB for each test case.