I hear we need to have working code for LC hard in 40 min? How doable is this?
I hear you can go on leetcode and check
No trolls please - asking from people who have done a phone interview with Airbnb in past
He’s only semi-trolling. I think he meant for you to gauge your current confidence in tackling LC Hard.
LC Hards on average (not the exceptionally hard ones) are on average to be solved in 40-45 minutes. In competitive on-sites 30-35 minutes with time to optimize. Consider this, LC Mediums are 20 minutes and LC easy is 5-10 minutes. Hence it’s not asking too much and in fact pretty standard. You either do two LC mediums in 40 minutes or just one LC Hard. Sometimes in on-sites that will be LC Medium + LC Hard in one sitting.
Yes, get that. Does the code have to compile and run on ide? Want to get a sense of how this works. Also, did you have/clear Airbnb onsite?
Yes, they use codepad but during onsite you can bring your own computer and choose your own IDE. It does need to compile and run.
Yes it has to compile and pass the test cases
They're not really LC Hards, most I've seen are LC mediums. I don't think the solution must be optimal, but they for sure need to work and pass test cases.
So if I read you correct, functionality is more important than optimal code - as long as code is not just brute force?
Or brute Force flies as well if test cases pass?
No brute force is allowed. Must run through all the test cases and all the follow ups if they have any. Better to finish quickly to allow all test cases and follow ups before you hang up.
Does it have to be the most optimal in 40 min? If not then I can see why they do that.