News for hackers. Stuff that matters.
Re:An Algorithm for Passing Programming Interviews (2020) by MauranKilom on Monday January 03, 2022 @07:17AM (#29779997)
I program in C++ daily and wouldn't know the currently accepted way to read lines from a text file in it off the top of my head. It's simply not something I ever have to do. A good candidate should still manage to figure it out in 30 minutes, but your programming experience is most likely a lot less universal than you think.
Re:An Algorithm for Passing Programming Interviews (2020) by ficklepickle on Monday January 03, 2022 @04:05PM (#29786888)
They didn't specify needing to read the file line-by-line. You could read the whole file at once. There might not even be any new line characters in the file. You invented a requirement.
Re:An Algorithm for Passing Programming Interviews (2020) by MauranKilom on Monday January 03, 2022 @05:13PM (#29787713)
They specified "strings", which I interpreted as lines in a text file. But it doesn't actually matter, because I could make fundamentally the same comment no matter how words (or "strings") are separated.