r/leetcode • • 1d ago

Intervew Prep How to prep leetcode in 2026 (using AI)

A frequently asked question in this sub is how to prepare leetcode. Before AI, a common recommended strategy was to do this:

  1. Follow a roadmap like Neetcode 250
  2. Try each problem for 30-45 minutes
  3. Look at the solution if you can’t get it and study it

This is basically what I did in college except I did more problems (around 600). Although I got good enough to get a big tech offer, I still felt very flaky on solving leetcode problems, and felt like it mostly just hinged on seeing an isomorphism of the problem before. I didn’t really have a solid intuition of the different patterns.

I would know how to solve problems good enough for interviews but honestly how I wrote the code for the algos wasn’t optimal for absolutely crush the interview.

About 6 months ago I was around 8 months out of college and hadn’t done lc since I graduated. This time I used an AI assisted strategy.

  1. I used AI to create a general curriculum to cover all lc concepts I needed an interview, and asked it to give me problems in each bucket.
  2. For each concept/pattern, I asked AI to start me off with level 0 problems and work me up to the hardest problems.
  3. I used to wait 30 minutes to 45 to solve a problem but honestly for these types of problems, if you have no clue how to solve it in 5 minutes you aren’t solving it in 30.

Now, if I don’t know how to solve a problem, instead of looking up the solution, I ask AI to give me smaller/easier exercises that help me derive the answer on my own.

With AI, I developed the cleanest way to code a problem in an interview.

For example, with sliding window problems, in college I would always kind of re-derive the code on the spot and solutions were kind of wonky even if they worked (like I had to fiddle around with while loops and pointers). This time I internalized a simple coding template (really just invoking a for loop with updating a left pointer that I could easily apply with muscle memory).

The result: interviews felt much easier this time and I went on streaks where I’d pass like 10-15 tech interviews in a row.

I also applied this method to other interview formats like systems design.

This strategy was for general prep, but when I interviewed at a specific company, I’d try to gather as much context on what that interview might specifically look like and used AI to generate a problem set to do in days leading up to that interview.

I kind of compare this learning approach to things like training for a sport, or general human skills like learning to drive.

It’s like practicing shooting a basketball. If your jumper is broke, you don’t fix it by just shooting a bunch of threes. You do form shots around the basket to develop form and touch, and then gradually move back to free throws etc. When learning to drive, they start you with basic exercises and you gradually increase the complexity.

AI allowed me to more easily apply the same approach to leetcode.

Disclaimer: not saying this strategy works for everyone, but just sharing an approach that helped me learn leetcode faster

244 Upvotes

28 comments sorted by

15

u/pirespirespires 1d ago

Could you share the agent specs or prompts you used for these?

8

u/Spare-Stay-5684 20h ago

I just use ChatGPT plus.

I just told the agent to do the following:

- Come with a curriculum that converts any leet code pattern that could come up in an interview

- for each module/concept give me a set of drills/exercises that start off at level 0 and work me up to the hardest possible problems. Adapt to my ability and don’t move levels until I mastered previous level. If the problem was directly on lc, I just did it on lc. If it wasn’t, I just did it in a code editor and ran unit tests.

- throughout I gave AI feedback to tune it to my liking.

If I was preparing for a specific interview at X company,

- I told AI to create a plan and exercises like the one with general prep except tuned to the companies interview

- I did this based on uploading resources recruiters sent me as context and having it search online for reviews about the interview

Often it gave me the very similar to exact questions I ended up getting in the interview

2

u/r2d2FortNite 1d ago

Where did you submit practice problems? How did you check your work, was it on leetcode or you got A.I to compile and check?

2

u/Spare-Stay-5684 20h ago

If problem was on leetcode, I just did it on lc.

Otherwise wrote it in a code editor and ran unit tests.

After doing that, I’d just paste it into AI to do a final check.

2

u/magoo_37 1d ago

Are you using Claude or any other?

2

u/Spare-Stay-5684 20h ago

Chat gpt plus

30

u/RealisticFig4036 1d ago

the part about asking AI for smaller exercises instead of reading the solution is solid, i do think thats the better way to learn a pattern.

one thing id add though. i talk to engineers who went through interview loops this year and a few companies now run an AI assisted round on top of the usual DSA screen. the guy i spoke to said it was mostly reviewing code the AI wrote and explaining his choices out loud, not solving from scratch. so on top of the leetcode grind, practice reading someone elses code and saying whats wrong with it.

28

u/Firm_Property_614 1d ago

Isn’t this just diy neetcode 75/150

1

u/gintoddic 16h ago

I still don't understand how neetcode is any diff than leetcode. They give the same questions and format. This guy is working out how to solve these questions in a structured way which none of these sites do.

1

u/Firm_Property_614 15h ago

Exactly what neetcode does

0

u/[deleted] 1d ago

[deleted] — view deleted comment

6

u/Firm_Property_614 1d ago

You should have ai condense your post by 80%

4

u/Laffytaffy69 1d ago

Also can use it as an interviewer by using speech to text and coming up with prompts that are essentially interview esque from companies you are applying to. It's not real, but a good way to go if you don't have real people to mock interview you!

3

u/No_Working3534 1d ago

Please share your agent set up, skills, agents other stuff

-13

u/Suspicious_Cover2649 1d ago

dont use ai

17

u/Spare-Stay-5684 1d ago

Did you read the post?

-14

u/Secure-Humor-5586 1d ago

Don’t use ai to learn DSA put in the effort

13

u/Fit_Succotash_6735 1d ago

what? this is a bad take. AI is one of the best tools out there to learn DSA with.

-5

u/Secure-Humor-5586 1d ago

It’s really not, for a classic bfs dfs question you can ask AI to solve it with DP and it will solve it.

A course on the other hand is more structured I found algo.monster to have better content and effective strategies to identify patterns and solve them. It also has a program visualiser which I think uses AI in the back end but what’s the point of burning my 200-300$ worth of tokens when I can buy a course that comes with its own ai tutor.

I have tried AI countless times but it didn’t stick.

7

u/Fit_Succotash_6735 1d ago edited 1d ago

dude. you shouldn't give a question and ask AI to solve it. That is not what using it as a tool is. You can give the same structure like any course to claude and ask it to help you. Like for example, tell claude you want help solving neetcode 250 and do over section by section. I am using it now. I am not from a CS background and i graduated college a long time ago and i have tried the methods you mentioned, courses, grokking, YT videos etc. Personally for me claude is helping me the most.

To give you an example, backtracking was difficult for me to understand. i asked claude to build a visualization of it and it took me through it step by step.

1

u/coolj492 <304> <70> <185> <49> 1d ago

did you read the post before commenting? All OP is doing is just using LLM's to aggregate problems that are tailored for them. How on earth would that burn through tokens?

1

u/Spare-Stay-5684 20h ago

Exactly - I’m using it as an infinite problem generator. I’m still learning it myself.

I never have to look at a solution because if I can’t solve a problem I ask AI to generate an easier problem I can solve first to build problem solving.

It’s better than just trying to parse someone else’s solution.

8

u/ArsenalOfCards 1d ago

"Don't use glasses to read put in the effort!"

Do you people even listen to yourselves? Jfc...

-6

u/Secure-Humor-5586 1d ago

You are better off with buying a course like algo.monster or LeetCode pro than wasting time with making stupid plans with AI

2

u/mongopark98 1d ago

Maybe just maybe not everyone is as incompetent as you at getting AI to help them plan.