Been leetcoding for a while now but the hards are simply too hard for me. When I see some of the solutions posted, it's truly amazing as to how folks come up with these ideas. Seems a lot like discovering penicillin! Leetcode masters, I call upon thee, How does one go from complete bewilderment to meh when it comes to the venerable leetcode hards?! Or does one really, is it just serendipity? TC:170k YoE:9
Is you think leetcode "hards" are hards try hards from topcoder or acm icpc. For leetcode you just need practice, but mb 110 hours is not enough. But 💯 IQ is enough.
Now you are just trolling. I set the practice poll option at 110 iq because I think we can all agree these beasts are not for the average mortal. Si?
No, not trolling, I have ~10 yoe in teaching algorithms at high school and university.
I just cracked fb and in the loop with msft and goog but i certainly dont have that high of an iq. It is literally practicing over and over loollll. Also some of the hards are just knowing some algo/ds. And others are just more tricky cuz of edge cases etc so just gotta be more careful when u design ur solution
Did you get any hards and I mean Z algorithm discovering hard??! Did ya??! How many ?
Ya i had leetcode hard problem during phone screen and also a easy-hard followup for an onsite. Idk what z algorithm is but hard questions come up on fb for sure
Yes how much before onsite?
Not all hards are equal. Keep reading other people’s solutions and try to learn the patterns. A lot of this stuff is pattern based. Start writing toy programs that implement these patterns.
430 solved here. Best way to handle hards is treat them like study articles rather than shit you gotta figure out first try. Most people who solve hards in interviews have either seen them or have had years of practice. Know the really common ones for the companies you care about And ya a lot of the solutions you see in discuss are clever. But you don't know how long it took people to come up with those. Could have taken hours which is not realistic in an interview
Which also suggests how ineffective an interview system is if it is asking such questions where prior practice on the same or similar problem makes it or breaks it.
Well the purpose of the interview process is to find smart candidates. Do you see Google complaining that their process is not yielding great candidates? No? Then it is effective. It's still a game though and you gotta play the game right to win.
Practice and memorization
Practice.
How my good friend, how do you go to figuring out that using a variant of the Z algorithm is the best way to get to an O(n) solution from WTF is Z algorithm?!