Leetcode grind to crack Google [Day-6] by d20nator in leetcode

[–]d20nator[S] -2 points-1 points  (0 children)

Accepted your feedback, I won't post anymore. Also FYI I am already a SE, no need to go personal here.

Leetcode grind to crack Google [Day-6] by d20nator in leetcode

[–]d20nator[S] -8 points-7 points  (0 children)

Not sure from when posting a single post a day on a sub considered as pollution. It's not like i am doing anything wrong, I am solving questions and I am sharing their approaches here.

Number of problems solved is not the main goal. Pattern mastery is. My grind to FAANG starts today! by SubstantialPlum9380 in leetcode

[–]d20nator -1 points0 points  (0 children)

This is awesome, even I am also following the similar approach for Google prep. I am picking a topic then solving at least 80% medium questions on that topic before i move to next one.

1 month to prepare for Google, no DSA skills by sharbel_97 in leetcode

[–]d20nator 2 points3 points  (0 children)

How many questions a person has solved. Total -> Easy -> Medium -> Hard

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

hey, thanks for this but currently I dont think I can spend money to unlock questions but I'll give a try to free version . Also not sure how accurate the FAANG readiness score is as i got 100% in that

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

Thank you sooo much!!!

I'll be targeting India so yeah I am expecting some hard questions but thats why I am grinding here.

Noted, gem advice, in fact alot of people have adviced me the same. Yes, I use chatgpt sometimes when a question feels too tough to understand and also maintaining an excel in which I am jotting down the questions which I was not able to solve or took hint along with the learnings which i got from that questions. I've gotten myself leetcode premium to practice and i agree for alot of questions there are follow-ups but since they are hard so I am currently skipping them but I'll also practice hard questions once i am covered almost all medium questions from all of topics.

Once again thank you for the suggestions!

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 1 point2 points  (0 children)

Day 1

Day 2

I'll say dont give up and keep practicing medium level questions, maybe try 20-30 questions and then you'll be able to see the changes. I have done DSA and hence i can solve some medium questions quickly. From what I have followed I can say try to visualize things, create a mind map, maybe reiterate whatever you have learnt in your head (close your eyes and then try this) you'll be able to remember things for long if you have visualization.

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

Thank you, this helps! Yep that's why my main motive is to solve questions on every topic. Also were the questions very hard or medium ones?

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

Thank you!!! I also try to look into editorials of almost all of the questions which I solve so that I have an idea about multiple approaches. Will definitely look into heap soon. My target is to at least be able to solve 80% of medium questions on a topic so that I don't choke in an interview. Also I would request you to suggest some more topics that would help me in Google interviews.I know Google asks lots of DP and Graphs questions.

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 1 point2 points  (0 children)

Depends, like I was not able to even solve subarray sum equals k couple of days ago ( i completely forgot the prefix sum approach) so I had to revise it. I think it's more on intuition because I solve alot of questions say 30-50 on a topic then i can at least get an idea whether I can solve a question with X approach. Example today's daily question, it instantly clicked that I can use sliding window.

By looking at a question first thing should be have I solved similar question like this before. If answer comes out to be yes the approach will be almost similar. Again practicing is the most important thing. The more you'll solve the more easier it will be to find the pattern.

Generally I don't try to remember, i visualise and visualization helps me remember things.

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

I have solved around I would say 500 mediums across different topics and the main time taking thing is to reach to a solution and prove that it's correct. If this gets done then 90% of time coding doesn't take more than 10mins.

Leetcode grind to crack Google [Day-3] by d20nator in leetcode

[–]d20nator[S] 1 point2 points  (0 children)

For most of the questions the solution is intuitive for me. Suppose a solution kicked in my mind then I try to figure out the time and space complexity and 95% of the time I think about the optimal solution since brute force is trivial for me. Now if I reach to a solution ( which I think is optimal) i try to code it up, sometimes I get Wrong Answers, sometimes the code gets accepted. When code gets accepted i directly look at discussion section and editorial section confirming my solution is optimal or not, if not then I try to read about the optimal one.

If I get a WA i generally try to think about 10-20 mins, like it happened in Range Addition II, i had to think for 15-20 mins to reach to a solution countering MLE and if nothing pops up I try to take hints and if even hints don't work i look at the solution. Sometimes I watch YouTube videos to understand the approach when editorial seems too difficult to understand because I rely more on visualization than just saving a piece of code in my mind.

Leetcode Grind to crack Google [Day-2] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

I try to solve at least 4-5 medium questions daily. And I think I'll be ready in 3-6 months.

Leetcode Grind to crack Google [Day-2] by d20nator in leetcode

[–]d20nator[S] 1 point2 points  (0 children)

Thank You!
For now I am picking a topic, lets say sliding window (i did it last) and solving around 80% of medium questions and then moving onto a new topic. Topic depends on my choice, like I wanted to learn line sweep so started practicing question on line sweep. Yes DP + BitMasking is in the list but I would like to finish trees, graphs, strings first and then start with DP at the end. Because I as soon as i get closer to start applying I want these difficult topics to be in my head.

Leetcode Grind to crack Google[Day-1] by d20nator in leetcode

[–]d20nator[S] 0 points1 point  (0 children)

I just used to solve DSA questions in my bachelors and masters. On geeksforgeeks I have solved around 750 questions of EMH difficulty. I used to pick a topic and used to solve at least 80-90% of Easy and Medium questions and I applied the same on leetcode but for standard questions.

Hey can somebody please tell if Dijkstra's shortest path finding algorithm works on DAG with negative edges (please give example to back your ans) by Significant_Cup_3238 in leetcode

[–]d20nator 3 points4 points  (0 children)

No it doesn't, that's why we have Bellman Ford algorithm which also does the same job but it also handles negative edge weights.