Back to problems

Unaligned Dedupe

Algorithm · Rubrik · Hard

You are given n strings made up of lowercase English letters, each having length m. The Blobstore team at Rubrik wants to reduce disk usage by deduplicating repeated blocks. A block is a contiguous substring, and the blocks within a string must not overlap. Choosing a block length l partitions every string into consecutive blocks; the final block may contain fewer than l characters. For a block b in string si, if an identical block b' appears anywhere in an earlier string or…

Checking your access…