All Questions
Tagged with compression interview-questions
6 questions
1
vote
2
answers
950
views
String Compression
Implement a method to perform basic string compression using the counts
of repeated characters.
For example, the string "aabcccccaaa" would become "a2b1c5a3". If the
"...
2
votes
2
answers
355
views
Naive string compression
Description:
Implement a method to perform basic compression using counts of repeated characters. If the compressed string is not smaller then return the original string.
Code:
...
6
votes
2
answers
7k
views
Perform basic string compression using the counts of repeated characters
I managed to implement this question from Cracking the Coding Interview:
Implement a method to perform basic string compression using the counts
of repeated characters. For example, the string <...
11
votes
4
answers
33k
views
Basic string compression counting repeated characters
My task was to implement a method which performs basic string compression by counting sequences of repeating characters. Given "aaabbbccc" it should return ...
1
vote
2
answers
7k
views
Run-length encoding using C
Recently I was asked in an interview to convert the string say "aabbbccccddddd" to "a2b3c4d5". i.e we have to avoid repeating same character and just adding the repeat count. Here 'a' is repeated ...
3
votes
2
answers
12k
views
Run Length Encoding
Given an input string, write a function that returns the Run Length
Encoded string for the input string.
For example, if the input string is “wwwwaaadexxxxxx”, then the
function should return ...