SmarterTravel Interview Question: Write a C function to encode ... | Glassdoor

Interview Question

Computer Programmer Interview New York, NY

Write a C function to encode a string using RLE encoding

Answer

Interview Answer

1 Answer

1

Pretty trivial, just realize that the output can be bigger than the input (i.e. consider the worst case). Also, realize that there are some edge cases related to very long repetitions in the input.

Interview Candidate on Jan 27, 2010

Add Answers or Comments

To comment on this, Sign In or Sign Up.