adventofcode

Happy Advent 2020! Please put answers in the pinned threads or create one if it does not exist yet. | https://github.com/adventofcode-clojurians/adventofcode-clojurians | Join the private leaderboard with code 217019-4a55b8eb
2021-06-29T06:42:59.026600Z

Thank you @tws, @yubrshen, @nbardiuk. I spent a considerable time thinking of an O(1) answer and when I failed to come up with one, I just settled for a brute-force. I still have a long way to go. I can build full-stack apps, microservices, CI/CD pipelines and data pipelines but algorithms is a hard one. I have no computer science/engineering background so I’m working hard to catch up on these. To be honest, 90% of what you guys said above sound alien to me but I will do my best to be better.

spfeiffer 2021-06-29T08:29:17.030600Z

I do not know if this helps you in your case, but i feel algorithm related interview questions are absolutely useless for assessing engineering performance on real life problems. Besides some edge cases, you will not need to implement low level algorithms. What these exercises perhaps show is how you work towards any solution, may it as bad as it can be, not about to show you can deliver a „good“ solution to an artificial problem under pressure.

pez 2021-06-29T06:45:34.027700Z

Thanks for posting this question, @noelmartin! I learn a lot reading the answers. Of course thank you all answering as well. 😃

➕ 2
nbardiuk 2021-06-29T07:31:06.027800Z

To be honest in real life interview under stress I would go with brute force solution as you did. The solution with trees is too complex for me to do without rereading docs. And the O(1) solution I've found only after implementing brute force and searching internet for this sequence of numbers. Thanks for puzzle, it was fun 🙂

slipset 2021-06-29T07:35:13.028300Z

On or off topic, but still https://www.darkcoding.net/software/a-day-in-the-life-of-a-professional-software-engineer/

slipset 2021-06-29T07:36:28.030500Z

Not that many devs actually have to solve the kind of problems you get in interviews. But some regard those problems as a good proxy for how you’ll perform in a job. Others do not.

👍 1
1
😂 2
tws 2021-06-29T10:53:55.032900Z

FWIW, this is very similar to problem 8.14 from Cracking the Coding Interview. Even mentions Catalan numbers as something nobody would be expected to know. Goes through a few different approaches.

tws 2021-06-29T10:55:10.033700Z

its all just part of the Interview-Industrial Complex. :face_vomiting:

😂 4