This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-29
Channels
- # adventofcode (8)
- # babashka (12)
- # beginners (91)
- # calva (6)
- # cider (2)
- # circleci (11)
- # clj-kondo (19)
- # clojure (202)
- # clojure-australia (7)
- # clojure-brasil (1)
- # clojure-europe (123)
- # clojure-nl (2)
- # clojure-poland (24)
- # clojure-uk (6)
- # clojured (1)
- # clojurescript (91)
- # core-async (23)
- # cursive (16)
- # data-science (5)
- # datomic (26)
- # emacs (27)
- # events (2)
- # graalvm-mobile (50)
- # graphql (4)
- # honeysql (4)
- # instaparse (33)
- # lsp (24)
- # meander (22)
- # nrepl (3)
- # off-topic (26)
- # pedestal (1)
- # re-frame (15)
- # releases (1)
- # sci (1)
- # shadow-cljs (20)
- # tools-deps (22)
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.
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.
Thanks for posting this question, @noelmartin! I learn a lot reading the answers. Of course thank you all answering as well. 😃
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 🙂
On or off topic, but still https://www.darkcoding.net/software/a-day-in-the-life-of-a-professional-software-engineer/
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.