r/programming • u/speckz • Mar 01 '17
Programmers are confessing their coding sins to protest a broken job interview process. “Whiteboard” interviews are widely hated. They also discriminate against people who are already underrepresented in the field.
https://theoutline.com/post/1166/programmers-are-confessing-their-coding-sins-to-protest-a-broken-job-interview-process
1.0k
Upvotes
3
u/quicknir Mar 02 '17
You put a constraint on the problem that was not actually there, and worded it incorrectly. When you say "this can be done with a LL", the implication is that this is the only data structure you need. Like "this can be assembled with a screwdriver" is not something that would be said if you also needed a buzz saw, drill, etc, in addition to a screwdriver. So I tried to figure out a way to do it with only a LL.
To be honest I still have no idea what you would use the linked list for; if you use a BST you do not need the LL for anything. It's hard trying to figure out someone else's convoluted inferior solution, without doubt.
If you are actually curious, when I was asked this problem, I came up with the two heap solution in around 5 minutes. It will probably be more comforting for you to not believe me though, so by all means.