News for hackers. Stuff that matters.
Re:Most candidates cannot solve this interview problem by Supermancho on Sunday February 07, 2021 @04:41AM (#26053844)
> the output requested isn't quoted.

Input: "aaaabbbcca"

Output: [("a", 4), ("b", 3), ("c", 2), ("a", 1)]

The input and output is explicit. The interpretation is a talking point.

Serialization into parens is not native for most? scripting languages. Creating a string would probably be most efficient for the output format, for sure. It's important to remember that interview questions are not just about the algorithm (for which this is trivial) but the requirements. Asking if the double quotes are representing strings (and what kind of strings for some languages) is part of the natural back-and-forth of an interview.

There are no comments on this comment yet.