Google Interview Question

How would you compress a string of characters by hand, not using zip. To reduce size.

Interview Answers

Anonymous

Aug 12, 2010

Forgot to add an example, to the above answer. Here's an example: String before compression: ABCCCDDDDE String after compression: AB3C4DE

2

Anonymous

Dec 13, 2012

I would focus on easy to apply and readable results. Naturally, we all do this when we send sms. You can change words that sound alike G8 = Great, remove vowels, cmptrs = computers. Use signs <3 = heart or love, etc.

Anonymous

May 26, 2022

The characters which repeat have a count prior to the character

Anonymous

Aug 12, 2010

The first thing that reminds me is "Run Length Encoding", which looks for repetition of characters.

1