Skip to content
Onsite

Catch That 420

EasyP3Coding

Return true if the number 420 appears in the array nums, otherwise false.

Example 1

Input
nums = [1,2,420]
Output
true

Example 2

Input
nums = [1,2,3]
Output
false

Example 3

Input
nums = []
Output
false

Constraints

  • 0 <= nums.length <= 10^5
  • -10^9 <= nums[i] <= 10^9

Hints

Run checks the 3 visible tests, Submit all 10.