Personal Finance
Yesterday
994
NRI in late 30s and low nw. whats your gameplan
Tech Industry
2d
22532
😬 crazy? I want to invest $300K in Nvidia
Personal Finance
Yesterday
841
What can you buy with 5M
Tech Industry
5h
627
Jealousy witnessing my same-sex crush get married. Yes I work at Nvidia but I have nothing else.
Tech Industry
Yesterday
579
Liberals ruin everything
Every year I start solving LC problems with the intention of getting into F/MAANG. I don't struggle much with easy problems, but when it comes to medium problems, I struggle getting the right answer and then loose motivation and I give up. I recently started again and solving Stack related problems. Since last week I am working on 5 problems and was able to solve only 2 of them correctly. I think stack is the easiest data structure but am still struggling, so am not sure how it will be when I start with Trees/Graphs. Also for these 2, it took me almost half day - one day to think on the right solution. I am still fighting with other 3 problems. - When does it get better i.e. when will I start solving medium problems in less than 15 mins? What does it take to get there? - Also, how frequently do you revise or when do you suggest I start revising? If I solve stack problems now and then let's say I work on Linked List, I will forget/struggle with stack problems after 3-4 weeks. What should I do to avoid that? I am not memorizing solutions, but I do forget the techniques when I switch from one data structure to another. Thanks! TC - $135K YOE - 10
Fucking LC. It’s such a dumb filter.
Stop doing problems to learn patterns. Start studying problem solving patterns so you recognize them in the problems.
sounds easier than it is. tbh. its harder to recognize what solves what if you can't figure it out. idk maybe i'm very dumb. i probably am. i look at solution than figure out why it applies to the problem... only issue is finding the common solution to the type of problem.
Looking at the solution to derive the pattern only works for people with a computer science background. I’m saying learn Binary Search, Depth First Search, Breadth First Search, Heaps, Graphs, etc. If you don’t learn fundamentals before jumping in, it’s like joining a Calculus class without ever taking Algebra, Geometry or Trig. It makes it seem like much more of a mountain to climb. I recommend something like AlgoMonster (I’m not affiliated) since they break down each concept and even give you problems that match the pattern.
Watch neetcode’s videos. Watch him describe the solution and then try coding it yourself. If you get stuck, continue watching the video to see the code solution
That's a good idea. I will look at the videos first and solve it myself before looking at the code in Solutions/Discuss tab.
I will offer you 666k to stfu about leetcode.
I’ll take that offer right now
bro it's OK. Don't spend more than 15-30 mins in coming up with the solution. Some mediums are really hard. I'd suggest do grokking before leetcode
It’s like a skill that takes experience and practice to get better. First time is always harder than 2nd time. Try solving 50-100 with solutions in hand, then try the explore cards to get familiar with each topic and patterns then come back to the company list and crack the problems again. You will be able to solve brand new medium easily at this stage.
10 yoe is enough time to accept that you need to aim lower
I’m confused as to why you can solve easy problems very easily but not progress at all in mediums. A lot of easy problems can turn into mediums just by adding a few constraints, so it might be something else. Are you able to solve easy questions in trees and graphs? How about easy questions in array manipulation (buy and sell stocks problem)
I have solved easy array manipulation problems in past. If I start now, I would struggle with problems for few days but then it will become easier. Yes I am able to solve most of easy Trees questions... do struggle with graphs, but getting better. With mediums, I would be able to pass the test cases given in the problem, but then when I submit the solution, some of the hidden test cases fails and then I realize I will have to write a new solution to fix that.
Ok that helps me understand your situation much better. What it means you have some understanding of the fundamentals but it can improve. If you are passing some of the test cases but not all, in most cases unfortunately it means your solution is not right and maybe only works in some cases. What I can suggest is, if you have already spent 30-45 min on a question and could not solve it all the way, take a look at the solution, try to understand it and where you answer falls short, and then move on to some other problem. Then next day go back to this problem and see if you can solve it. If you still couldn’t then it means you didn’t fully understand the solution, and it might indicate some gaps in understanding the fundamentals
I was in your same boat. You just have to push through. There's no magic. That's why they call it grinding. I went from half a day to 45 min on mediums in about a month. I would say try to strengthen your intuition about the solution and confirm it with the solution tab. Even if you can't code the solution, if you correctly identify the right data structure and approach. That's progress.
Thanks! Will keep trying.
Just go to the solution and then code out the solution a couple times while fully understanding the logic. Come back again 2-3 times in the future to lock it into memory
This tbqh. It'll just randomly click for you one day, particularly when you start refactoring and messing with variable names to something that makes sense to you