#14. maxEnd3
maxEnd3
Background
Description
Given an array of ints length 3, figure out which is larger, the first or last element in the array, and set all the other elements to be that value. Return the changed array.
Format
Input
Output
Samples
[1 2 3]
[3, 3, 3]
[11 5 9]
[11, 11, 11]
[2 11 3]
[3, 3, 3]
Limitation
1s, 1024KiB for each test case.