InterviewDB Question

Number of Runs: Count Consecutive Equal-Element Segments in an Array

Question Details

Problem A "run" is a maximal contiguous subarray of equal elements. Given an array, return the number of runs. Example: Round 2 - Variant Return not just the count but also the encoded form: [(value, length)] pairs (run-length encoding). Example: The…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Onsite Phone