Algorithm · Databricks · Hard
You are given a sequence of non-negative integers. Your job is to create a two‑way compression scheme that turns the sequence into a compact, human‑readable list of run descriptors, and later perfectly recovers the original sequence from that list. The compressor may represent chunks of the data using one of two run types: Run‑Length Encoding (RLE) or Bit‑Packing (BP). An RLE run captures a series of consecutive identical numbers. It is written as the string "RLE[value,…
Checking your access…