Array Coding Challenges
Master array manipulation: sorting, searching, two-pointer techniques, sliding windows, and dynamic programming approaches by solving Array coding challenges.
Problems (26 total)
Duplicate Indices Map
Return a list of indices where duplicates occur for each repeated value.
Balanced Mod Subarrays
Return all maximal subarrays where the counts of numbers congruent to 0, 1, and 2 modulo 3 are equal.
Parity Flag Map
Return a boolean array indicating whether each element is even.
Alternating Parity Check
Determine whether the array alternates strictly between even and odd numbers.
Balanced Triplets Subarray
Return any longest contiguous subarray where every block of three consecutive elements contains exactly one even number and two odd numbers, preserving the subarray as a list.
Longest Balanced Parity Subarray
Return the longest contiguous subarray where the number of even and odd elements are equal, formatted as a string of comma-separated values.
Even Numbers as String
Collect all even numbers from the array and return them as a string separated by commas.
Longest Mod3 Balanced Subarray
Find the length of the longest subarray where counts of numbers congruent to 0, 1, and 2 modulo 3 are equal.
Longest Alternating Parity Subarray
Find the length of the longest subarray where even and odd values strictly alternate.
Longest Balanced Subarray
Find the length of the longest subarray where the counts of even and odd numbers are equal.
Even-Odd Balance
Find the difference between the sum of even numbers and the sum of odd numbers.
Running Sum of Purchases
Return the cumulative total after each purchase in the list.
