News for hackers. Stuff that matters.
Re:Microsoft changed how it interviews software developers by akiselev on Sunday December 30, 2018 @08:37PM (#18792490)
I mean, in languages like Python it can be as simple as `foo[::-1]` or some similar method. Anyone who can give a naive answer like that or

    usize len = strlen(foo);
    char* bar = malloc(len);
    for (int i = 0; i < len; i++) {
        bar[i] = foo[len - (i + 1)];
    }
and explain why that won't work for unicode strings, I imagine, would pass that particular fizzbuzz test. Bonus points for pointing out the null byte off by one error.

The only competent programmers I can think of that wouldn't be able to come up with that off the top off my head work in embedded or FPGAs where strings are rarely relevant.

There are no comments on this comment yet.