Solution: String Compression
Understand how to apply the two pointers technique to perform in-place string compression. This lesson guides you through run-length encoding the input array with constant extra space, enabling you to tackle similar problems confidently in coding interviews.
We'll cover the following...
We'll cover the following...
Statement
Given an array of characters, chars, compress it in place according to the following rules:
Start with an empty string
s.For each group of consecutive repeating characters in
chars:If the group length is
...