Took me one day to understand palindrome pairs leetcode 336. Ruined my entire Friday after seeing my stock plunge and then spending a day to complete 1 lc question. I am wondering how is this scalable. Does someone team up where we do 5 questions each and then explain to each other. Parallelism ftw.
It’s very rare to get a LC hard.
Its a tagged question for the last 6 months of a famous company.
I got a hard on an online assessment for a tier 3 company. If you can’t do hards you’re really rolling the dice
dm and we can study together, we can go over neetcode 150 if u are down
Tbf, it is almost impossible to figure out LC hards in an interview if you have never seen anything similar to the question before. KMP, Bellman-Ford, Prim’s, Levenshtein, Kadane’s, etc, etc, were all state of the art algos that required deep lengthy research taking certainly more than 1 day. So cut yourself some slack and keep practicing :)
True. It’s kind of crazy how Fenwick trees were only invented 30 years ago but we need to use them in interviews now 😜
Some of those are not even close to “state of the art” I’ve come up with kadanes mid interview, that one isn’t that difficult
the more you do em the more you’ll get patterns keep grinding king/queen
Lol how is this LC hard? Maybe optimum solution is hard but you can easily: write a function to test palindrome by combining 2 strings in 2 different ways. Then go through array, you. You compare element 0 with element 1 then all the way up to last element. Then you start with element 1 comparing element 2 all the way to last element. It take O(n2). There are ways to improve but give a solid brute force answer and then handle all special edge cases well with some test cases and you will be through. Then if time permits you can do some small improvements. A real hard one is you can select any number of strings from the array. So your answer can be [ (1,5,7), (0), (4,5,6,7,9,16,3,0)]
No way brute force will get you there. You have to come up with trie solution
I have done 100+ interviews. There are 2 different criteria for answers: for those who have seen and practized the question and those who haven’t. If someone started with trie it is clear he or she has seen this question or something similar before. I am looking: clean variable names. Nice grouped logic with empty lines, explaining on the way why he or she does that. Small self correction along writing code A bonus for someone who hasn’t seen this question is that candidate explains brute force is o(n2) , naturally thinking to make it o(nlogn). Then start with trie solution Remember the theoretical goal of interview is to hire someone who can code products. The interview results should have less to do with whether interviewee has practized the specific question.
Try hards for like 20min and then just look up the solution and memorize the alg. Simple.
I got this question in an interview today. Fml I bombed.
Health & Wellness
Yesterday
355
Lasik cost
Tech Industry
Yesterday
2171
What happens when most of your team is Indian?
Tech Industry
2d
1248
Which large tech companies you think will last 20+ years?
Tech Industry
Yesterday
1262
Women, help me understand why this is inspirational
Tech Industry
3d
59453
Crossed a line with my boss
That’s rough….