3 ms·
I used to walk people through the "2sum" and "3sum" variants of this for an interview question. I was not looking for anything complicated, such that it was ea
by taeric 2y ago
I used to walk people through the "2sum" and "3sum" variants of this for an interview question. I was not looking for anything complicated, such that it was easy enough to talk through solutions that we could play with. Had a few people that would take us down some rather complicated approaches. (Even gave offers to some that got through some complicated solutions that wouldn't work.)
I never tried doing an "optimal" solution. Thinking about the problem, I'm curious if a BDD approach wouldn't work? Will try and write one up to see. Fun times.
- morkalork 2y agoPlease tell me the position entailed more than just CRUD application work
- taeric 2y agoI said I gave offers even for folks that didn't get it working. :D I was more using this as a way to discuss code. And "2sum" is a pretty trivial problem to solve linearly. Especially if you allow high level language use. (To directly answer the question, there was more than CRUD. Probably still more CRUD than folks would expect.)