Earlier quoted context omitted.
I feel like I'm entering a whole different universe on HN. Maybe things are this equal and fair on the senior, high-paying part of the spectrum that most people here seem to occupy, but in general there's a huge power imbalance in job interviews. Unless you're special and the company wants you in particular, it costs them nothing to turn you down in favor of the other 10000 perfect applicants, while you must find a j…
> I'll assume they want Python or Java or C++ or Rust, not Bash or ALGOL 68. I've solved interview questions with one line of Bash before and gotten an offer. The question was something like "count all the files in this folder with a name ending in X". The interviewer was happy I had a quick solution and they could move on to talking about something more interesting.
And a Python solution that avoids those problems is also quite simple and terse for the example you gave, and probably for most problems in the category.