4 ms·
I thought it was a waste of time because the most optimal solutions tended to require a stateful, even pointer-diddling, style of code that doesn't align with w
by jim-jim-jim 5y ago
I thought it was a waste of time because the most optimal solutions tended to require a stateful, even pointer-diddling, style of code that doesn't align with what I do in the real world. I'm sure they're fun and enlightening to some extent, but I'm not really interested in programming like it's still the 90s.
In Australia I have fortunately not encountered a company that uses these puzzles in interviews. I feel bad for my friends in America who have to practice them every time they switch jobs.
- xupybd 5y agoYeah I find in business software an optimal algorithm is not worth the cost of readability. Most of the applications I work with have moderate data and few users. It has to work robustly and has to be easy to modify.
- hnzix 5y agoWorking closer to the front end, I've found that a solid foundation in SQL (to prevent ORM explosions), regex and basic app architecture is far more useful than deep algo knowledge. I've had to use tree traversal like a handful of times and bit shifting like twice. Let's not talk about working with dates and times.
- rich_sasha 5y ago> Let's not talk about working with dates and times. Took me years of part-time use to really understand these. Still waiting for an opportunity to code any non-trivial data structure I meticulously learned about in the past.
- josephg 5y agoYou'll rarely find that sort of work when doing user-visible stuff, because most software doesn't have enough users or complexity to justify the cost of custom data structures. But if you look at the software running on your computer right now, you'll find these programs are chock full of clever data structures. (Eg VS code, firefox, nodejs, rustc, etc.) If you want that sort of work, you kind of need to be building software infrastructure. So, contribute to linux, mysql, firefox, ... or work at FAANG, Microsoft, Dropbox, or something like that.) Or work on a product that needs high performance (like video games) or has a lot of users (like Twitter).
- lloydatkinson 5y agoWanted to echo the same sentiment but from the UK too
- erklik 5y ago> In Australia I have fortunately not encountered a company that uses these puzzles in interviews. The big ones are definitely doing it. FAANG of course, but also Atlassian, Optiver, Xero, Akuna etc. I am not sure, but maybe it's more common in the less experience levels? I am not experienced enough to know hiring after 5YOE etc.
- nsonha 5y agobig banks use them for filtering too, even contracting. And there are also some small companies that use them for some reason, probably the tech lead learned that from a big firm they worked in.
- erklik 5y agoYeah. I think there's a lot of startups who are sort of emulating the FAANGs because it is "norm". I personally think that's good because I'd rather have everyone have a similar process than have very different processes across companies. Makes it much easier to interview and prepare for one.
- nsonha 5y agoI'd rather they interview real skills used on the job, and since it's already what I do day to day, I don't need to prepare. With small companies leetcode is a waste of time because they don't have time to do rounds and rounds of interview like big tech, so using leetcode for 1 round mean they only have another 1 or even no round left for the real stuff, system design and the like. An example of good tech interview at a company (not in Australia) I interviewed recently, is a take home test that encompasses doing 1 or more PRs to fix issues, code reviewing someone else's PR, and document a simple security audit.
- nsonha 5y agoWe use it less but they're there, mostly for filtering. It's hilarious because there was one time this company sent me an easy hackerrank. I nailed it, did interviews with them, one of which they followed up on the lame hackerrank instead of something useful like pairing or system design, nailed that too. Then they called me after the final round and asked me to do a dynamic programming problem, just so they "have one more data point". I actually tanked that one but at that point I already felt they didn't know what they were looking for anyway, one of waaax
- nsonha 5y ago> most optimal solutions tended to require a stateful, even pointer-diddling, style of code not necessarily, a search problem can be solved in a functional way in 2 steps: 1) constructing a search space in lazy stream, this is where dfs or bfs happens 2) filtering the stream using standard filter function Similarly if you do dynamic programming using memoization instead of tabularization you might not need any state I think, like practical problem solving, algorithms have been predominantly taught in a stateful way of writing code that was popular because of the computing power constraints back in the day. That doesn't mean that's the only way to write them