I cannot believe Google interviewers ask questions require to use algorithms like Burrows-Wheeler transform. Anyone seen this question @ real interviews? I don’t think even John von Neumann could induce it within 45 minutes. I know there are alternative solutions easier than Burrows-Wheeler but still I don’t think anyone can reach to the correct solution during interviews. https://leetcode.com/problems/cracking-the-safe/
Man this is stupid. Cut the balls of that interviewer and put them in that safe. Let's see how fast he can crack it.
Pretty well known problem actually if you studied euler path, having that said terrible interview question.
My eyes
Leonard Euler would have easily solved it 250 years ago without even having a computer. And now you have all books and all knowledge in the world and can't solve something that people knew 200years ago? Shame on you.
Lol wat
But this wasn't an interview for a math professor position. It was for software engineering.
Googlers ask banned questions all the time
It is called Unexpected hanging paradox. You think that if they promised a surprise question, they can't ask a leetcode question because you expect it and it will not be a surprise. So you think that they will ask something different and you stop leetcoding. Then on the interview they ask you a leetcode question and it becomes an utter surprise to you. Exactly as they said.
I was asked word ladder for SDE1 when I joined a year ago lol.
Brings up another point. Are you guys studying and memorizing named algorithms like this? There are a bunch for graph problems too but I feel like a lot of them are just academic optimizations like Heaps algorithm for instance. Seems like a way better approach to just memorize patterns and solve things with those. In the case of permutations, backtracking
People memorize a transition from an unclear "safe" to a clear "graph with nodes and edges". And then it becomes a more standard question.
I also got this question at Google. Was hired.
How did you perform in this question? Do you know the algorithms in advance?
I did well. I made progress on the question but didn't fully "solve" it or know any algorithm in advance.
We all know ole 753.
Oh yeah I got asked that at Youtube once. Interviewer didn't seem to expect me to finish it though, was mostly interested on what I'd come up with and the blueprint of how I'd code it.
If it is not expected to be resolved in 45 minutes, what is the rubric to get “hire” sign? Probably bfs implementation of Euler path in sudo code without any major hint?
Well I came up with a solution using tries, trying to eagerly test combinations that weren't tested yet. Interviewer agreed it'd work and I started coding. 5 min before time was up he switched me to explain the rest since I'd ran out of time. I'm certain he had positive feedback (got 4 out of 5 and my last one I flunked badly).