News for hackers. Stuff that matters.
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.