is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
I don't think that the encoding function should use 'x' to represent the repeating appearance of a character because the problem states that an input can be any ASCII char.
- yubad2000 May 27, 2016For example, if an input String is "18xa", how can it be encoded? "18xa", or "1x11x81xx1xa"?
If we don't encode the char with count < 4, the code will be "18xa" and the decoder will decode it as "1aaaaaaaa" if the maximum count is set to 9.
My idea is to use a char to store the counts for each char. i.e. ['a']['b']['b']['b'] -> [1]['a'][3]['b']
Therefore, we don't need to worry about 'x' and the maximum count can be 255.