Designing url-shortner is no different than edit distance.
With Google it's actually been a pattern. Interviewed for them and passed HC three times, but each time I couldn't bring myself to work for them given how bored everyone looked.
They must be really strange folks. I can't imagine 1) a company who would propose such a thing to a (potential) employee, 2) a person who would agree to that. Seriously, WTF.
It’s optimising for the 1%.
There are many algorithms in "leetcode" style questions that almost never get used in real world software development. Tree traversal is not one of them.
Heck, the whole family of lisp languages are nothing but "(non?)abstract syntax trees". Imagine getting reprimanded by a user named `morelisp` :)
And to be pedantic, since DOM trees are not binary trees, it's not a "binary traversal" problem. I encounter binary trees a lot less than the non-binary counterparts, but the traversal algorithm is basically the same.
By the second: Holy shit go read a book. Please.
Though it worked out for me in the end, but I was definitely annoyed for a day or two.
I told her no thank you and hung up.
Funnily enough though, I heard once you join as a Front-end engineer, you are pretty much a regular SWE and can join any team and work on any tech, even backend/systems.
I didn't practice that much since I hate wasting time on useless tasks, and the interviewer literally told me to just leetcode and read the interview book. I asked him a bunch of web questions and he had no fucking clue, all he did was leetcode and interview every year.
It means reasonably complex algorithmic and data structure problems you're supposed to solve by coding under pressure, quickly, in interview conditions.
And if you think that's not happening, I have a bridge in Brooklyn to sell you.
Algorithmic thinking is kinda what I do. So solving those problems doesn't feel like a bad proxy for how I might perform on the job.
However, how often do you come up with high performance, close to optimal algorithms, on your own, within 45 minutes?
How often do you implement heaps and such as part of your day job, versus using standard libraries or common ones?
Edit: In fact thinking back, they even sent me tips on how to improve my leetcode skills in preparation for the interview! The whole process was completely guided by it.
That being said, guidance is to ask 2 medium difficulty questions as opposed to 1 hard one.
The questions the human is asking you come from a big question bank and a lot of it is listed on LeetCode under the meta company tag because people leak them.
People use Leetcode to practice for those interviews, they don't use the leetcode site in the interview
I mean, now I'm just here to watch the downvotes pile on....