Solve substring and top‑K pair problems | LinkedIn