Showing 3 of 3 questions
Rearrange an array such that nums[0] < nums[1] > nums[2] < nums[3]... This is the wiggle sort problem, where you need to order elements in an alternating fashion.
#1. Wiggle Sort II
Find two numbers in a given array that add up to a specific target value, and return their indices. Essentially, you need to efficiently locate the pair that satisfies the sum requirement.
#2. Two Sum
Find the number of contiguous subarrays within a binary array that sum to a given target value. The array only contains 0s and 1s.
#3. Binary Subarrays With Sum
Page 1 of 1 · 3 total