JobsJob TrackerJob alerts

Komli Media ยท 12 questions

All 12Coding 12
  • Box counting puzzleCoding
  • Find first occurrence of 1 in a sorted bit sequenceCoding
  • Shorten string based on consecutive run parameterCoding
  • Divide two numbers using addition and subtractionCoding
  • Railway bridge train puzzleCoding
  • Product of array elements except self without divisionCoding
  • Find all possible sets of numbers that sum to nCoding
  • Kth smallest elementCoding
  • Check if Linked List is PalindromeCoding
  • Level order traversal in spiral formCoding
  • Sort an array in waveformCoding
  • QuickSortCoding
โ† Komli Media questions
  1. Interview questions
  2. Komli Media
  3. Shorten string based on consecutive run parameter
Coding

Shorten string based on consecutive run parameter

Filed under Komli Media

The question

Given a string and an integer n, truncate consecutive runs of any character if the run length exceeds n.

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

Related Komli Media questions

  • Box counting puzzle
  • Find first occurrence of 1 in a sorted bit sequence
  • Divide two numbers using addition and subtraction
  • Railway bridge train puzzle
  • Product of array elements except self without division
โ† Find first occurrence of 1 in a sorted bit sequenceDivide two numbers using addition and subtraction โ†’

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