Array Contains Value
EasyAcceptance: N/A
Given an array of integers nums and an integer target, return true if the array contains the target value, otherwise return false.
Example 1:
Input: nums = [1, 2, 3, 4, 5], target = 3
Output: true
Explanation: 3 is present in the array
Example 2:
Input: nums = [1, 2, 3], target = 5
Output: false
Explanation: 5 is not present in the array
Constraints:
- 1 <= nums.length <= 1000
- -1000 <= nums[i], target <= 1000
Discussion
Please login to view and join the discussion.
Login to ContinueLoading...
Status:Not run yet
Run your code to see results