Habijabi | Can you solve this, Sherlock?
Warning. If you like puzzles, this will take up a lot of your time.
I've been (trying to do)/doing algorithmic programming on Hackerrank and other similar websites for the past couple of months. (Practising competitive coding is the only way to get a soft engineer job, apparently.) Some problems are really fun, while others are now standard algorithms that took humanity 10s of years to figure out - you can't expect yourself to come up with solutions to all of them without sitting through the theory.
I was trying out 'interview practice questions' on Hackerrank, when I found this. This question is one of a kind, I haven't come across anything like it before, and certain you haven't either.
It took me 10 minutes and a slight peek at the discussions tab to convince myself this question is legit. A guy mockingly posted "IMHO, the problem is a hacker challenge - it's not a reasonable "practice interview problem" unless you are interviewing for the NSA".
Very true. :D
The input format gives you nothing but one clue. Hit and trial, a little logic and intuition may give you another clue. You're given one test case, and that's that. This is when the real struggle begins. A little bit more of meddling here and there, trying out absolute random logic to see if you can guess what the problem setter is asking you to guess. Half the test cases seem to work, and yet you have no clue whatsoever of what the question really was. The real question is, figure out the question, given the 32 test cases. I've spent over 3 hours now, and I think I'm oh so close. Yet so far.
Link to Question - Enter the contest. Sign up for it. The question goes by the name habijabi.
Do leave a comment if you tried/solved it. I'd love to share my approach.
[Questions like these that actually test your thinking ability, your level of intuition are what I'd expect Google, Amazon and other good companies to ask. This question does/(can be modified to) involve deep knowledge of algorithms/data structures once you start to figure out what's happening. You can't just solve it without the knowledge of data structures. Remember, you aren't given the question, but you are expected to first figure out the question, and then make sure all test cases pass. This is unlike other common interview questions where you're plainly asked to implement say a DFS or a tree traversal with a small twist here or there in either the question or the implementation.
But nope, they fixate themselves to standard algos from here and the Algorithms book by Cormen.]
I've been (trying to do)/doing algorithmic programming on Hackerrank and other similar websites for the past couple of months. (Practising competitive coding is the only way to get a soft engineer job, apparently.) Some problems are really fun, while others are now standard algorithms that took humanity 10s of years to figure out - you can't expect yourself to come up with solutions to all of them without sitting through the theory.
I was trying out 'interview practice questions' on Hackerrank, when I found this. This question is one of a kind, I haven't come across anything like it before, and certain you haven't either.
It took me 10 minutes and a slight peek at the discussions tab to convince myself this question is legit. A guy mockingly posted "IMHO, the problem is a hacker challenge - it's not a reasonable "practice interview problem" unless you are interviewing for the NSA".
Very true. :D
The input format gives you nothing but one clue. Hit and trial, a little logic and intuition may give you another clue. You're given one test case, and that's that. This is when the real struggle begins. A little bit more of meddling here and there, trying out absolute random logic to see if you can guess what the problem setter is asking you to guess. Half the test cases seem to work, and yet you have no clue whatsoever of what the question really was. The real question is, figure out the question, given the 32 test cases. I've spent over 3 hours now, and I think I'm oh so close. Yet so far.
Link to Question - Enter the contest. Sign up for it. The question goes by the name habijabi.
Do leave a comment if you tried/solved it. I'd love to share my approach.
[Questions like these that actually test your thinking ability, your level of intuition are what I'd expect Google, Amazon and other good companies to ask. This question does/(can be modified to) involve deep knowledge of algorithms/data structures once you start to figure out what's happening. You can't just solve it without the knowledge of data structures. Remember, you aren't given the question, but you are expected to first figure out the question, and then make sure all test cases pass. This is unlike other common interview questions where you're plainly asked to implement say a DFS or a tree traversal with a small twist here or there in either the question or the implementation.
But nope, they fixate themselves to standard algos from here and the Algorithms book by Cormen.]
Comments
Post a Comment