Search
⌘K
Get Premium
Leetcode 1868. Product of Two Run-Length Encoded Arrays
Given two run-length encoded arrays (lists of [value, frequency] pairs) representing two sequences, compute the element-wise product sequence and return its run-length encoding, merging consecutive equal products. The core challenge is a two-pointer consumption of runs (subtracting counts and emitting/combining product runs) in linear time in the number of runs.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.