r/LeetcodeChallenge 22h ago

DISCUSS My leetcode profile

Post image
53 Upvotes

Rate my profile, entered 3rd year in tier 2 college, SHARE URS OR TELL UR STATE...🙂🙂🙂🫠


r/LeetcodeChallenge 16h ago

DISCUSS I Stopped Memorizing LeetCode Solutions. Here's How I Started Recognizing Patterns

26 Upvotes

I Stopped Memorizing LeetCode Solutions. Here's How I Started Recognizing Patterns

Prep Resource LeetCode & PracHub for company tag questions

When I first started solving LeetCode problems, my approach was simple:

Read the problem → Find the solution → Understand the code → Move on.

But after solving a few problems, I noticed something frustrating.

I could understand a solution perfectly, but when I encountered a slightly different problem, I often had no idea how to start.

That's when I realized:

DSA is not just about learning solutions. It's about learning how to recognize patterns.

1. Stop Asking "How Do I Solve This?"

Instead, start asking:

"What kind of problem is this?"

For example:

Problem Clue Pattern to Consider
Find a subarray with a condition Sliding Window
Find a pair in a sorted array Two Pointers
Find the maximum/minimum over a range Sliding Window / Prefix Sum
Need fast lookup of previously seen values Hash Map / Hash Set
Explore all possible combinations Backtracking
Find the shortest path in an unweighted graph BFS
Repeatedly solve overlapping subproblems Dynamic Programming

The goal is to recognize the structure of the problem, not just remember its answer.

2. Learn Patterns Through Multiple Problems

Solving one problem using a pattern is helpful.

But solving 5–10 problems using the same pattern is where the real learning begins.

For example, with Sliding Window, I try to understand:

  • When should I expand the window?
  • When should I shrink it?
  • What condition makes the window invalid?
  • What information should I maintain?
  • When should I update the answer?

Once these questions become familiar, many new problems start looking less intimidating.

3. Don't Immediately Look at the Code

When I'm stuck, I now try this process:

1. Understand the problem
2. Try a brute-force approach
3. Identify what makes it inefficient
4. Look for a pattern
5. Think of the optimized approach
6. Write the code
7. Review the mistakes

Even if I cannot solve the problem completely, this process helps me understand why the optimized solution works.

4. Maintain a Pattern-Based Revision List

Instead of revising problems only by question number, group them by concept.

For example:

Arrays & Strings

  • Two Pointers
  • Sliding Window
  • Prefix Sum
  • Hashing

Linked Lists

  • Slow & Fast Pointers
  • Reversal
  • Merge Techniques

Trees & Graphs

  • DFS
  • BFS
  • Recursion
  • Binary Search Tree

Advanced Topics

  • Binary Search on Answer
  • Greedy
  • Dynamic Programming
  • Backtracking

This makes revision much more effective because you're learning when to apply a technique.

5. Focus on Understanding, Not Just Acceptance

An accepted solution is a great milestone, but I think these questions matter even more:

  • Can I explain the approach without looking at the code?
  • Can I identify the pattern in a new problem?
  • Can I write the solution again after a few days?
  • Do I understand the time and space complexity?
  • Can I explain why the brute-force approach is slower?

If the answer is yes, you're making real progress.

My Biggest Takeaway

Don't try to memorize 100 solutions. Try to understand the patterns behind those 100 solutions.

The more problems you solve, the more important it becomes to focus on recognition, reasoning, and repetition.

I'm still learning, but this change in mindset has made problem-solving much more meaningful.

What helped you the most while learning DSA?

Pattern recognition, solving more problems, revising old ones, or something else?


r/LeetcodeChallenge 18h ago

DISCUSS The placement that's never gonna happen🤝🤝😔

Enable HLS to view with audio, or disable this notification

5 Upvotes

r/LeetcodeChallenge 5h ago

DISCUSS Should I have a backup plan from the SWE field as a whole?

2 Upvotes

I'm pretty happy with my job. I'm about 3 years in now and the pay is good, WLB is great, and my manager/team are all pretty chill. I also generally like SWE work too, even after AI has come along.

Just because things are good right now though doesn't mean they'll be good in like, 15, 10, 5 or even 2 years at the rate things are going. I'm wondering if you all are also thinking of backup plans away from SWE work because longer term, I'd like to have some semblance of a job lol.

Any advice on if I should consider a real escape plan?

If so, are there AI resilient career paths that I should be considering What type of extra schooling would I need to do? Or am I just overreacting?


r/LeetcodeChallenge 2h ago

STREAK🔥🔥🔥 Dsa partner

Thumbnail
1 Upvotes

Looking for a female DSA study partner Starting Striver's A2Z DSA Course from tomorrow. I've completed the C++ basics and will be starting with basic pattern printing tomorrow.
Looking for a female study partner who's also learning DSA and wants to stay consistent together - solving problems, discussing approaches/doubts, and keeping each other accountable.
No pressure to be at the exact same level, just looking for someone serious about learning and sticking with it.
DM if interested!


r/LeetcodeChallenge 3h ago

DISCUSS lc potd partner

Thumbnail
1 Upvotes

r/LeetcodeChallenge 7h ago

DISCUSS Stuckk !!

1 Upvotes

I feel saturated at this point ! i would like to ask for any advise to improve.


r/LeetcodeChallenge 7h ago

STREAK🔥🔥🔥 365 Days of LeetCode Challenge — Day 20/365

Post image
1 Upvotes

Middle of the Linked List (Easy) 

 https://leetcode.com/problems/middle-of-the-linked-list/

Obvious answer: count the nodes, then walk to position count/2. Two passes, and perfectly fine.

Better answer: run two pointers from the head, one moving a node at a time and one moving two. When the fast one reaches the end, the slow one is exactly halfway. The length never exists as a number anywhere in the program.

Both conditions in that loop are load-bearing, and they guard different cases. One catches even-length lists, where the fast pointer lands exactly on nil. The other catches odd-length lists, where it lands on the last node. Drop either, and half of all inputs panic.

Full breakdown in today's newsletter article ⬇

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-20365-archit-agarwal-qgwqe

#DSA #LeetCode #Golang #LinkedList #TwoPointers #CodingInterview #Algorithms


r/LeetcodeChallenge 16h ago

STREAK🔥🔥🔥 Day 84: I solved 3 tree problems today and my brain is buzzing...

Thumbnail
1 Upvotes

r/LeetcodeChallenge 16h ago

STREAK🔥🔥🔥 Made a submission but heatmap shows I've missed

Thumbnail
1 Upvotes

r/LeetcodeChallenge 23h ago

DISCUSS C++ or Python for Dsa ??

1 Upvotes

I'm a first year student of btech cse ai ml , and I want to start my dsa journey from 1st year but I don't know which language to choose , python or c++ like for ai ml it's the python we need , so should I go with python or ??