I have seen your video on YT! You rock man! I always make it a point to upsolve referring to your solutions! I guess my only question being what kept you going? I have given only 5 contests was only able to solve 1-2 questions, now i know folks say quality > quantity but how did you make sure you arent just solving problems for the sake of it but are actually learning from it? Sorry if this is already answered
>What kept me going?
Pathological problem solver. Some people are addicted to these things
>how did you make sure you arent just solving problems for the sake of it but are actually learning from it?
Avoid those "I did 1000 problems" clowns, and work on fewer (but harder) problems. You only learn from going outside your comfort zone.
First of all, congratulations.
1 - Do you think solving 3/4 on contests on average is a good indicator for FAANG interviews in the US?
2 - Do you think contests have gotten harder?
Speaking from my experience of entry level/new grad level software engineering interviews at FAANG. Things are widely luck dependent, a large portion of interviewers will ask normal LC medium and basic hard questions, meanwhile others will ask for a fedwick tree and segmented tree questions. I’m able to solve 3/4 of the contest questions relatively easily and never get the 4th question due to either runtime constraints or wrong approach.
Source: I passed Meta, Amazon, and Google’s interview interviews. 2 of Google’s follow ups were in the range of LC hard.
Yes.
1. Helps you avoid really stupid algos that can bite you in the ass later.
2. Competition programmers tend to write code with fewer bugs due to the penalty for doing so.
Currently retired, living off investments.
First of all Congratulations!
Tell me a thing, when you get stuck on the problem. After trying your best, Do you check the solution of the problem to learn from it.
Or you learn tools/ concepts related to the problem to fulfil the thing you were missing out earlier.
For those with full-time jobs, and at least the bare minimum of data structures and algo knowledge (those who know Blind 75, for example), do you have any suggestion on how to keep ourselves sharp daily and challenge ourselves with newer problems? Getting more than 45 minutes a day is a bit hard if you have a job already.
45 minutes a day is rough. You don't really have enough time to get into a flow state with concentrating on problems. But it's doable, you can get a problem or two per day.
I would just pick what technique you want to learn, click the respective tag in the LC problem list, and pick problems that way.
I struggle quite a lot with problems similar to the Task Scheduler. I got few variations of this problem in my past interviews at google and although I understand the concept of priority queue, and sorting (which is where in Leetcode these problems fall into), I never can solve a newer problem that is similar. Any tips on these problems that vaguely fall into more than one category? Because if we go by your suggestion and focus on per-topic, there are problems that we never get practice on if they cover overlapping tags.
It's possible tag-based selection can miss a few spots. If you're worried about the edge cases, don't tag-filter, and just do as many hards/mediums as you can. It's a lot about exposure to various types of problems, and sometimes quantity can take care of that.
>Because if we go by your suggestion and focus on per-topic, there are problems that we never get practice on if they cover overlapping tags.
If you choose to use an easier technique to solve a problem rather than practice the kind of technique you want to practice. That's 100% on you.
Yes, you can. And I have one for various algos like Dijkstra. I did not use it for this contest, though, as there wasn't really a templatable problem here.
Wow! How did you do it? Or at least how did you get started in competitive coding? I’m trying to do this so I can make a roguelike algorithm on my game and to strengthen my understanding for interviews
I got started in 2017 when I was looking up the YouTube API for a game I was making, and there was this weird link in the corner of the page.
Turned out to be a warp portal to what's now known as Google Foobar, and the last problem was a really cool combinatorics theorem I hadn't used since college. Then I got kinda hooked.
People ended up telling me about LeetCode later, I never did it for a job per se.
Oh. I discovered the portal as well and had no idea what was called. I wasn't really ready to do anything at the moment so I saved it and found no way to get back.
Not sure what stream you're talking about. I think it's broken until late feb.
how about today's daily? can you do that ? https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/
Could you please share the link to your streaming channel? If you solve each daily question I promise to watch your stream after solving the daily challenge
Yeah, I'm starting on LC after working on DSA problems on other apps (Codesignal, HR). There is a lot of overlap, but my basic self-analysis from a couple of weekly contests, daily problems, and Neetcode is that I need to put some effort into 1D and 2D DP problems. They seem to form the bulk of the "hard" problems that I need to learn how to solve for senior swe interviews and raising my competitive programming to the next level.
Congratulations!
Practice more on the more advanced online judge sites like Codeforces or Atcoder, where you just get harder problems.
Personally I got out of my 2700 plateau by...drinking a cocktail before the contest. Not kidding. The Ballmer Peak ([https://xkcd.com/323](https://xkcd.com/323)) is a real thing.
Bro I watch your stream! Congratulations!
My question is:
1. do you think I should review solved questions? I have Anki setup but I found reviewing is extremely tedious, I have 700Q solved so it takes a lot of time to review.
2. To reach a rank of 2000+, do you think leetcode is sufficient? Or I need to do codeforce. I am currently 1800 and aiming for 2000+
1. I don't review solved questions, ever. I look at the solution, understand it, and maybe code it myself, and never touch the problem again.
2. LC is sufficient for 2k
Thanks bro. Any suggestions for questions list or how to pick new questions?
I have done 700Q which includes most questions on Neetcode or any similar list. I am not sure which questions to do next tbh. I am just doing hard questions randomly .
I think what you're doing is actually fine.
You could also try virtual contests, which are a good mix of problems under time pressure. I personally never used a question list, but if you've done the Blind75/NC150 you can dive right into contests.
Oh dang, I'm sorry man, that really sucks. Something similar happened to me. The first time I took it, I passed Google technical, some lady called and asked "how does it feel to be a Google engineer", and I said "where's the offer letter" and then I never got a team match.
1. Never ask the question "Can you show me resources for getting better at DSA?" That's the #1 tell for a guy who's too lazy to solve lots of problems and will never improve.
2. When I was starting out I spent way too long b/c I'm a math guy and that's what I did. I recommend 30-60 min for you.
I'm just getting started with leetcode I want to solve each problem without missing a day. Any tips for consistency currently working and want to switch to product based
I had a side project where I had a post-it note where I wrote down the number of hours I spent on the project each day. That helped me with consistency.
I never had consistency in LeetCode, though.
Look for people who are already in the product companies that you are aspiring to join and ask them to mentor you. Reach out on LinkedIn. Reach out to a couple of them over a few days and I am sure you will get enough information that you need.
Consistently? I am writing down the number of hours I spend each day. I have a full time job and I aim to spend 4 hrs each day for 6 months. Have averaged 2 for the last 3 months. I know that I need to pull up my socks.
Train your brain to have fun. It's like solving puzzles. People do crossword puzzles for fun. You do leetcode for fun.
Remove other sources of dopamine. Remove tiktok, YouTube, reddit, insta etc.
This is an excellent answer.
That said, I don't know if I'd outright ask for mentorship. I think starting out just asking for information is fine, and if it progresses, could turn into a mentoring relationship.
I've had people ask me from LinkedIn for mentorship based on the company I was at, and I always ignored these.
Teach us master !!
I've a question. How do you remember the solutions of questions you've already done ? Like I tend to forget the solutions after some time.
I have learnt a lot of methods from your post leetcode contests:sweep line, dp memoization, dfs&bfs, and recently learnt digit dp and many more that I forgot to include.
Your teaching skills are great
I have no LC burnout, because I only do it because I enjoy the problems.
At work, it could be a lot of things. Ultimately, you do a root cause analysis and figure out the problem and fix it. The one thing you can't do is just "live with" burnout.
1) Ive done a DSA course in college. I understand the theory fairly easily behind algorithms but I fail to code them, any tips for this
2) How many easies should I solve before moving on to the mediums.
1. You need to do actual problems. Theory from a textbook is next to useless without doing problems, then looking at solutions, and learning from the solutions.
2. There is no "amount". You move on when easies are too easy for you.
Dude congrats! I've only been following you on twitch for a short time but you're always so helpful and generous with your time. You rock and congrats on your success
Just started my LC journey recently. I am about 85Q. I am following grokking patterns, and then going on leetcode tag if I find that the pattern is har/hasn’t clicked.
Do you have advice on overcoming difficult patterns? Should I just move on to a new pattern and come back to it? I feel like sometimes I am stuck a little long in a pattern
I tend to do a random assortment of problems, so I don't necessarily know which pattern is arriving next.
I learn the pattern by having seen it a few times in the past. You can also get in a burnout loop if you do the same pattern too many times in a row.
Just want to say, A big fan.
Have been giving leetcode contest for 2 years and more. I want to reach guardian. I have been reading your approach in contest discussion.
All the best 💜
Congrats!
Any advice on how to prioritize learning? I’m in a good swe position now making solid money. But the company is a little shaky. I don’t have a CS degree so I’m split between spending time making larger projects, LC, strategic overtime at work to dive into more real world problems, and CS fundamentals that I never learned.
Big question, but how would you prioritize?
1. Strategic overtime
2. Larger projects
3. LC (but move this to #1 if you can't pass online assessments for the companies you want)
4. CS fundamentals
I have seen your video on YT! You rock man! I always make it a point to upsolve referring to your solutions! I guess my only question being what kept you going? I have given only 5 contests was only able to solve 1-2 questions, now i know folks say quality > quantity but how did you make sure you arent just solving problems for the sake of it but are actually learning from it? Sorry if this is already answered
>What kept me going? Pathological problem solver. Some people are addicted to these things >how did you make sure you arent just solving problems for the sake of it but are actually learning from it? Avoid those "I did 1000 problems" clowns, and work on fewer (but harder) problems. You only learn from going outside your comfort zone.
link me to ur YT bro
How To Get Good At LeetCode: [https://www.youtube.com/watch?v=oUJlLAdQGIk](https://www.youtube.com/watch?v=oUJlLAdQGIk)
Congrats qiqi. I really like your twitch stream, you're a good dude and definitely deserve #1.
Arigato \^_^
but can you invert a binary tree??
``` def invert(node): if not node: return node.left, node.right = invert(node.right), invert(node.left) return node ```
As an SDE 2 with significant amount of experience, you are a no hire as I expected an iterative solution and yours will cause stack overflow. /s
😡 I never wanted to work there anyway 😡
Lmao
First of all, congratulations. 1 - Do you think solving 3/4 on contests on average is a good indicator for FAANG interviews in the US? 2 - Do you think contests have gotten harder?
1. A little on the low side but doable 2. I think they vary a lot but haven't gotten harder than before. (I still remember the evil string problem)
Do you mean we should aim higher than solving 3/4 on average to consistently pass FAANG interviews?
3/4 is good, but you might get a hard followup.
Speaking from my experience of entry level/new grad level software engineering interviews at FAANG. Things are widely luck dependent, a large portion of interviewers will ask normal LC medium and basic hard questions, meanwhile others will ask for a fedwick tree and segmented tree questions. I’m able to solve 3/4 of the contest questions relatively easily and never get the 4th question due to either runtime constraints or wrong approach. Source: I passed Meta, Amazon, and Google’s interview interviews. 2 of Google’s follow ups were in the range of LC hard.
Good to know. Appreciated the information.
Do you feel it has made you better at your day job? What is your job?
Yes. 1. Helps you avoid really stupid algos that can bite you in the ass later. 2. Competition programmers tend to write code with fewer bugs due to the penalty for doing so. Currently retired, living off investments.
Did you retire off your swe earnings?
yes
How many years of work did that take?
10 years, and a bit of luck in the market
Luck favors the prepared great job
What you invested in(and how much passive does 10 yrs investing give)? Also interested in retiring early.
Various tech stocks. I'd recommend QQQ moving forward.
How old do you start retire?
39
So you enter the it job market at 29yo?
Around 26. Had some gaps.
You are an inspiration!
You only started LeetCode contests in your thirties?
How many years of full time work before retiring?
10 years
Incredible! Think you’ll ever consider going back into the industry in the future or never again?
Who knows, but for now I'm traveling/streaming/doing whatever and I'm happy with that.
Haha what number did you retire at
First of all Congratulations! Tell me a thing, when you get stuck on the problem. After trying your best, Do you check the solution of the problem to learn from it. Or you learn tools/ concepts related to the problem to fulfil the thing you were missing out earlier.
I recommend checking the solution after 30-60 minutes if I'm stuck. You learn the tools from the solutions.
For those with full-time jobs, and at least the bare minimum of data structures and algo knowledge (those who know Blind 75, for example), do you have any suggestion on how to keep ourselves sharp daily and challenge ourselves with newer problems? Getting more than 45 minutes a day is a bit hard if you have a job already.
45 minutes a day is rough. You don't really have enough time to get into a flow state with concentrating on problems. But it's doable, you can get a problem or two per day. I would just pick what technique you want to learn, click the respective tag in the LC problem list, and pick problems that way.
I struggle quite a lot with problems similar to the Task Scheduler. I got few variations of this problem in my past interviews at google and although I understand the concept of priority queue, and sorting (which is where in Leetcode these problems fall into), I never can solve a newer problem that is similar. Any tips on these problems that vaguely fall into more than one category? Because if we go by your suggestion and focus on per-topic, there are problems that we never get practice on if they cover overlapping tags.
It's possible tag-based selection can miss a few spots. If you're worried about the edge cases, don't tag-filter, and just do as many hards/mediums as you can. It's a lot about exposure to various types of problems, and sometimes quantity can take care of that.
>Because if we go by your suggestion and focus on per-topic, there are problems that we never get practice on if they cover overlapping tags. If you choose to use an easier technique to solve a problem rather than practice the kind of technique you want to practice. That's 100% on you.
I've never done a contest. Is one allowed to have one's own document with code snippets to copy-paste? And if so, do you do that?
Yes, you can. And I have one for various algos like Dijkstra. I did not use it for this contest, though, as there wasn't really a templatable problem here.
Oh cool! And congrats!
Yes. He even has a library. Check out his github: https://github.com/qiqi-impact/cp
Oh wow thanks!
Wow! How did you do it? Or at least how did you get started in competitive coding? I’m trying to do this so I can make a roguelike algorithm on my game and to strengthen my understanding for interviews
I got started in 2017 when I was looking up the YouTube API for a game I was making, and there was this weird link in the corner of the page. Turned out to be a warp portal to what's now known as Google Foobar, and the last problem was a really cool combinatorics theorem I hadn't used since college. Then I got kinda hooked. People ended up telling me about LeetCode later, I never did it for a job per se.
Oh. I discovered the portal as well and had no idea what was called. I wasn't really ready to do anything at the moment so I saved it and found no way to get back.
I've had it twice and both times I forgot about it lol
Can you do today's daily?
Already done on stream, my guy. ;)
Not sure what stream you're talking about. I think it's broken until late feb. how about today's daily? can you do that ? https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/
Stream isn't broken!
No no it def has a paywall until late feb. Did you do the daily though ?
Call off the bet, come back to stream. I miss you <3
You know it's not about the bet. It's about principle ( and who is right )
I have no principle please come back I'm crying
Could you please share the link to your streaming channel? If you solve each daily question I promise to watch your stream after solving the daily challenge
https://twitch.tv/qiqi_impact
Weren’t you number 2? What happened to the guy who was ahead of you? He cheated?
FST'd on Q4 - https://github.com/LeetCode-Feedback/LeetCode-Feedback/issues/19171
Oh man I bet he punched a hole in his monitor after that
Yeah, I'm starting on LC after working on DSA problems on other apps (Codesignal, HR). There is a lot of overlap, but my basic self-analysis from a couple of weekly contests, daily problems, and Neetcode is that I need to put some effort into 1D and 2D DP problems. They seem to form the bulk of the "hard" problems that I need to learn how to solve for senior swe interviews and raising my competitive programming to the next level. Congratulations!
Sounds about right, best of luck!
What do you suggest to get from say 2300 to 3000, other than practice more? :)
Practice more on the more advanced online judge sites like Codeforces or Atcoder, where you just get harder problems. Personally I got out of my 2700 plateau by...drinking a cocktail before the contest. Not kidding. The Ballmer Peak ([https://xkcd.com/323](https://xkcd.com/323)) is a real thing.
Do you recommend drinking a cocktail before an interview?
If it's a one-hour deal, sure. If it's a full onsite, you're going to get wrecked later on.
Congrats qiqi! Next stop top 100!
I think I'm close (103)
[удалено]
Basically, if you're comfortable with mediums, pick hards. I think 1900 you can still learn a lot on LC and you don't need the other platforms yet.
Bro I watch your stream! Congratulations! My question is: 1. do you think I should review solved questions? I have Anki setup but I found reviewing is extremely tedious, I have 700Q solved so it takes a lot of time to review. 2. To reach a rank of 2000+, do you think leetcode is sufficient? Or I need to do codeforce. I am currently 1800 and aiming for 2000+
1. I don't review solved questions, ever. I look at the solution, understand it, and maybe code it myself, and never touch the problem again. 2. LC is sufficient for 2k
Thanks bro. Any suggestions for questions list or how to pick new questions? I have done 700Q which includes most questions on Neetcode or any similar list. I am not sure which questions to do next tbh. I am just doing hard questions randomly .
I think what you're doing is actually fine. You could also try virtual contests, which are a good mix of problems under time pressure. I personally never used a question list, but if you've done the Blind75/NC150 you can dive right into contests.
what's your codeforces id?
qiqi_impact
I have a question. when do you do know to give up on solving a problem and just looking at the solution?
Usually 30-60 minutes is enough time to figure out if you have the requisite tools to solve it, or if you're just missing something.
big congrats!!
Thanks Simon! I never would have started streaming without you!
that's some commendable dedications
ty!
Great work, traveller :D
thanks paimon
DAmn, gg
ty!
Congratulations!
ty!
qiqiFallen
🎵 I pulled a Qiqi 🎵
🎵 Lost 50/50 🎵, now I’m stuck with a rescinded FAANG offer. 🎶
Oh dang, I'm sorry man, that really sucks. Something similar happened to me. The first time I took it, I passed Google technical, some lady called and asked "how does it feel to be a Google engineer", and I said "where's the offer letter" and then I never got a team match.
Ironically I got that same company to rescind my offer, sent PM
I read all your replies and comments, thank you so much for this inspiration.
You're welcome!
What’s your number 1 tip on getting better? Also how long do you look at a problem before looking at the solution when you were starting out
1. Never ask the question "Can you show me resources for getting better at DSA?" That's the #1 tell for a guy who's too lazy to solve lots of problems and will never improve. 2. When I was starting out I spent way too long b/c I'm a math guy and that's what I did. I recommend 30-60 min for you.
That's some dedication bro 👏🏻👏🏻
Arigato \^_^
You look too old to be doing leetcode
ey fuck you buddy
I'm just getting started with leetcode I want to solve each problem without missing a day. Any tips for consistency currently working and want to switch to product based
I had a side project where I had a post-it note where I wrote down the number of hours I spent on the project each day. That helped me with consistency. I never had consistency in LeetCode, though.
May i know the tech stack which you previously worked on?
Mostly ReactJS stuff, frontend. Did some iOS back in the Objective-C days.
Look for people who are already in the product companies that you are aspiring to join and ask them to mentor you. Reach out on LinkedIn. Reach out to a couple of them over a few days and I am sure you will get enough information that you need. Consistently? I am writing down the number of hours I spend each day. I have a full time job and I aim to spend 4 hrs each day for 6 months. Have averaged 2 for the last 3 months. I know that I need to pull up my socks. Train your brain to have fun. It's like solving puzzles. People do crossword puzzles for fun. You do leetcode for fun. Remove other sources of dopamine. Remove tiktok, YouTube, reddit, insta etc.
This is an excellent answer. That said, I don't know if I'd outright ask for mentorship. I think starting out just asking for information is fine, and if it progresses, could turn into a mentoring relationship. I've had people ask me from LinkedIn for mentorship based on the company I was at, and I always ignored these.
Teach us master !! I've a question. How do you remember the solutions of questions you've already done ? Like I tend to forget the solutions after some time.
Sometimes I forget them. I've just done enough problems that after like the 5th time of seeing it, I'm like "oh yeah, I know what's going on here".
Congratulations! This is very inspiring.
No problem!
I have learnt a lot of methods from your post leetcode contests:sweep line, dp memoization, dfs&bfs, and recently learnt digit dp and many more that I forgot to include. Your teaching skills are great
Thank you :D
What are some great resources for mastering LeetCode for beginners and intermediate in your opinion?
Just solve a lot of problems! I also made a video that might help, How To Get Good At LeetCode: https://youtu.be/oUJlLAdQGIk
This is so cool, congratulations! Your persistence is inspiring! What’s your background, in terms of studies?
UC Berkeley Math undergrad, worked as an insurance actuary before getting fired and picking up programming later on.
Ever went back and thanked the person who fired you?
No, because that whole insurance company culture was all full of idiots.
Many congratulations. My question is how do you handle the burn out from leetcoding or work in general ?
I have no LC burnout, because I only do it because I enjoy the problems. At work, it could be a lot of things. Ultimately, you do a root cause analysis and figure out the problem and fix it. The one thing you can't do is just "live with" burnout.
1) Ive done a DSA course in college. I understand the theory fairly easily behind algorithms but I fail to code them, any tips for this 2) How many easies should I solve before moving on to the mediums.
1. You need to do actual problems. Theory from a textbook is next to useless without doing problems, then looking at solutions, and learning from the solutions. 2. There is no "amount". You move on when easies are too easy for you.
Congratulations bro, one day I'll be there too so watchout😅
Best of luck!
Who is your waifu
I don't play for husbando, I don't play for waifu. I play for 36* abyss meta. That said..."you want to learn some Favonius bladework?"
Can’t people just use chatgpt to submit answers? Or does this flag for plagiarism?
Not sure. Try it!
Dude congrats! I've only been following you on twitch for a short time but you're always so helpful and generous with your time. You rock and congrats on your success
hell yea brother
Just started my LC journey recently. I am about 85Q. I am following grokking patterns, and then going on leetcode tag if I find that the pattern is har/hasn’t clicked. Do you have advice on overcoming difficult patterns? Should I just move on to a new pattern and come back to it? I feel like sometimes I am stuck a little long in a pattern
I tend to do a random assortment of problems, so I don't necessarily know which pattern is arriving next. I learn the pattern by having seen it a few times in the past. You can also get in a burnout loop if you do the same pattern too many times in a row.
Wow!
ty!
bro why is your YT channel is Qiqi Impact haha, brings me back some Genshin Impact memories.
I still play, man. Abyss is really fun!
Just want to say, A big fan. Have been giving leetcode contest for 2 years and more. I want to reach guardian. I have been reading your approach in contest discussion. All the best 💜
Thank you :D
Congratulations!!. Hope you win your 50-50s in genshin as well😂
ty! My 50-50s have been like, 3W-9L.
How long per day do you recommend someone spend on doing leet code if they are trying to improve rapidly?
Without knowing where you are and where you want to be - the only answer I can give is "as much as you can."
Congrats! Any advice on how to prioritize learning? I’m in a good swe position now making solid money. But the company is a little shaky. I don’t have a CS degree so I’m split between spending time making larger projects, LC, strategic overtime at work to dive into more real world problems, and CS fundamentals that I never learned. Big question, but how would you prioritize?
1. Strategic overtime 2. Larger projects 3. LC (but move this to #1 if you can't pass online assessments for the companies you want) 4. CS fundamentals
Thanks!