#7. sameFirstLast

sameFirstLast

Background

Description

Given an array of ints, return true if the array is length 1 or more, and the first element and the last element are equal.

Format

Input

Output

Samples

[1 2 3]
false
[1 2 3 1]
true
[1 2 1]
true

Limitation

1s, 1024KiB for each test case.