โ† Infoedge questions

Compress or reduce repeated characters by integer factor

Filed under Infoedge

The question

Write a program that takes a string and an integer k as input and produces an output reducing contiguous repeated characters according to k (e.g., 'aaaabbbcc', 2 -> 'abcc'; 'aaabbbbbccdddd', 3 -> 'aaabccd').

No write-up yet. Related questions below have one.

Related Infoedge questions

Collected from public candidate posts and coding forums. Updated Nov 2026.