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)

Show:

Duplicate Indices Map

Return a list of indices where duplicates occur for each repeated value.

Solve

Balanced Mod Subarrays

Return all maximal subarrays where the counts of numbers congruent to 0, 1, and 2 modulo 3 are equal.

Solve

Parity Flag Map

Return a boolean array indicating whether each element is even.

Solve

Alternating Parity Check

Determine whether the array alternates strictly between even and odd numbers.

Solve

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.

Solve

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.

Solve

Even Numbers as String

Collect all even numbers from the array and return them as a string separated by commas.

Solve

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.

Solve

Longest Alternating Parity Subarray

Find the length of the longest subarray where even and odd values strictly alternate.

Solve

Longest Balanced Subarray

Find the length of the longest subarray where the counts of even and odd numbers are equal.

Solve

Even-Odd Balance

Find the difference between the sum of even numbers and the sum of odd numbers.

Solve

Running Sum of Purchases

Return the cumulative total after each purchase in the list.

Solve
Showing 1 - 12 of 26 problems
1