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.
I was doing the same to weed out the bad candidates - asking them something they should know, something logical and basic - but got bad feedback once, been asked to instead focus my questions on the strong points described in the CV. I mean, for the practical part the candidate wasn't able to count the unique words in a text file in 30 minutes. I thought opening files and reading strings and splitting are so basic anyone should know them.