r/DSALeetCode • u/Quirky_831 • Jan 10 '26
Leetcode
gonna start doing it using java, anyone's interested
r/DSALeetCode • u/Quirky_831 • Jan 10 '26
gonna start doing it using java, anyone's interested
r/DSALeetCode • u/DebuggingLife009 • Mar 19 '26
Hi everyone,
I’m currently in my 2nd semester. I learned Python in my 1st sem and now I’m starting DSA from Striver’s playlist. I’ve decided to use C++ for coding, but I don’t really know C++ yet.
I watched the 1–1.5 hr C++ basics video in the playlist, where he mentioned that you don’t need to master C++ before starting DSA - you can learn it along the way. That makes sense, but I still feel a bit unsure.
So I wanted to ask people who were in a similar situation:
Did you face any problems starting DSA without strong C++ knowledge?
If yes, what kind of issues did you run into?
And what would you suggest your past self do differently?
Would really appreciate any advice or experiences 🙏
r/DSALeetCode • u/SachinKaran • Mar 26 '26
r/DSALeetCode • u/New-Inflation8155 • Dec 27 '25
I am just finishing off my 3rd sem . Is it too late to start things... Like I did nothing till now. Thinking of to start dsa . And like Should I do it with cpp or python . Python is easy as I learned it once . But cpp everyone says to do . Which is better to go with . Please tell ??
r/DSALeetCode • u/nian2326076 • Oct 13 '26
I recently interviewed for Amazon SDE-2 and was rejected after the first DSA round. I thought it had gone well, so I'd appreciate help spotting gaps in what I described below.
I applied through the careers portal, received the OA shortly afterward and completed it that day. The interview call followed soon after, with Round 1 around 10 days later.
The OA included two typical coding questions, a full-stack bug-fix task, and behavioral/design-choice multiple-choice questions. For the bug-fix task, I chose a backend framework and got a codebase plus a list of bugs. There was an AI assistant, but it didn't help me navigate or search the codebase.
Round 1 had two DSA problems. I explained the approaches, complexity and a dry run for each.
LC 16: 3Sum Closest, n ≤ 10³
Brute force: O(n³)
Binary search: O(n² log n)
Two pointers: O(n²)
LC 305: Number of Islands II
These are the complexities I stated in the interview, which is part of what I'd like checked:
Brute force: O(n² · q)
Union-Find / DSU: O(q + n²)
Then I got the usual "tell me about a time you..." Leadership Principles questions.
For further practice, the Amazon Interview Questions bank has candidate-reported prompts. Job-application autofill can save some repeated form entry when applying elsewhere after a rejection.
Where would you look for the problem in this breakdown: the complexity analysis, how I explained the solutions, or the LP answers? I'd especially appreciate a sanity check on the DSU analysis from people who've cleared SDE-2.
r/DSALeetCode • u/fushyy1366 • Sep 22 '26
I’m looking for a study buddy to learn and practice DSA in Python. I’ve previously covered arrays in C++ and have also studied a little bit of stacks, but now I want to continue learning DSA in Python.
If you’re also learning DSA and are serious about studying consistently, feel free to DM me. We can practice together, discuss problems, and keep each other accountable.
r/DSALeetCode • u/RoyalNo1193 • Feb 23 '26
I've been practicing DSA for a while, and I noticed something frustrating.
I solve a problem, feel confident… then a few weeks later I revisit it and my brain just blanks. Not because I didn’t understand it, I just never had a solid way to revise patterns long-term.
I started thinking more about memory-focused revision like reviewing brute/better/optimal approaches similar to flashcards, instead of only solving new problems every day.
Curious how others deal with this. Do you keep structured notes somewhere, use spaced repetition, or just resolve everything again from scratch after some time?
Honestly just wondering if this is a common experience among people grinding DSA.
r/DSALeetCode • u/StatisticianNo2104 • Oct 11 '26
A twelve-step pipeline. The loop check takes 383 ns and allocates 328 bytes. Two variables do it in 3.17 ns and allocate nothing.
The job: a pipeline stage names the stage that runs next, somebody edits a config, a next points backwards, and the runner walks that chain forever. So you check for a loop before running anything.
The check I wrote is the definition written down — remember every stage, and if you arrive somewhere twice, it loops. It is obviously correct, and it can also tell you where the loop starts, which is what the alert needs to say.
On a 100,000-stage chain, it allocates 4.73 MB to return a boolean. And it costs the same whether the chain loops back after two stages or after ninety-nine thousand, because the map gets built either way.
Then the struct: a stage names one next stage. Many stages can point at the same one, each points at exactly one. So the path from any stage is fixed, which means this is not a graph problem at all — it is a chain, and a chain that loops is a run-in followed by a ring.
Two cursors, one moving a stage at a time and one moving two. Either the fast one runs off the end, or both end up in the ring, where the gap between them shrinks by exactly one per turn — so they land on the same stage rather than stepping over each other. Meeting is arithmetic, not luck.
47.8x on the long chain and zero allocations at any size. The part I did not expect is the twelve-stage row: 120.6x, because the map pays for a map before it walks anything.
Not that 383 nanoseconds matters. It matters where the check runs per request.
One thing worth not shipping: the hop limit. Give up after 100 steps and call it a loop, the way HTTP clients do with redirects, and a 150-stage pipeline with no loop in it gets reported as one.
That is day 21 of the daily challenge, Linked List Cycle, sitting in a pipeline runner.
Full piece in today's Newsletter.
https://www.linkedin.com/pulse/loop-check-allocated-47-mb-return-boolean-archit-agarwal-zeksc
It worked in dev, episode 12.
#Golang #DSA #Algorithms #Performance #SoftwareEngineering #DataStructures #100DaysOfCode
r/DSALeetCode • u/Akshu_ • Jul 28 '26
r/DSALeetCode • u/KaiZer_6996 • Jul 03 '26
so soon i m entering in 4th yr of college ,I study dsa mostly through courses videos and yet I m confused what exactly is dsa all about, is it about like solving the same questions again and again , not blind solving but yeah visualizing the flow and dry run it. Like if i have to solve a random question there is a probablity i might not solve it, is it about practicing the same leetcode questions and patterns again again so that if the question similar or exactly same appear in interview or Oa round you would be able to solve it? i personally think its about to revise and resolve pattern wise sample space of question around 400-500 to get ready for basic and mid companies who offer 3-10 lpa whats your thoughts on this, Need advice how should i really proceed from here where i left such a small period of time.
r/DSALeetCode • u/Basic_Ad_286 • Sep 20 '26
Hi! I’m a final-year student, and I’ve completed my DSA preparation. Now I’m looking for someone to study with consistently over Google Meet, preferably from around 10 PM to 2–3 AM.
My plan is to revise DSA regularly while starting System Design. I feel having a study partner would help with consistency, accountability, and staying focused during these late-night sessions.
r/DSALeetCode • u/Life_Lingonberry_963 • Jun 27 '26
r/DSALeetCode • u/Left_Clerk_1027 • Mar 18 '26
hey! completely new to this dsa and let code can u guys help me to start it from scratch what to study where exactly to do it from how can I do it and what would be the correct way
r/DSALeetCode • u/RopeEmotional0910 • Sep 19 '26
I'm a btech final year student .. 21M
140+ problems done so far with decent knowledge of arrays, strings, binary search, stacks, etc. Currently moving into recursion.
Dammm I’ve broken my consistency like 3 times , so this time I’m actually locking in.
Looking for someone in 3rd/4th year BTech who’s also grinding DSA LeetCode. If you are starting from beginning or you're ahead of mee.. no worries let's help and discuss each other.. making concepts clear from eachother..
Let’s solve problems, maybe make the grind a little less boring 😉
r/DSALeetCode • u/deepaknishad • Sep 29 '26
class Solution {
public:
int trailingZeroes(int n) {
int global = 0;
int sum = n;
for(int i = n; i>1; i--){
sum = sum * (i - 1);
}
// i am using leetcode but i don't know that the string STL is include or not but this code is not working above loop of sum is giving the right output. So how i can convert num to string in effective way?
std::string value = std::to_string(sum);
for(int i = value.size(); i >=0; i--){
if(value[i] == 0){
global += 1;
}else{
return 0;
}
}
return global;
}
};r/DSALeetCode • u/Asleep-Advance-8769 • Oct 27 '25
r/DSALeetCode • u/natehiggers_19 • Feb 19 '26
Can anyone please suggest me some best videos or YouTube channels where I can learn DSA from scratch. I have tried learning DSA from few YouTube channels like bro code, apna college etc. but ended up getting confused.
r/DSALeetCode • u/sathwika_Reddy2346 • Dec 20 '25
I tried strivers DSA last year , I was getting good with it but it's taking more time to complete and felt so hard while going a stopped it again. Then after 6 months I tried chatgpt for doing dsa . It gave some schedule for 6 months but that has really unpractical ended up burning out , stressed and not able to focus on my work properly. Just lying bed depressed. Can some body give me any suggestions , like should I go with strivers again and if so how should i stay not getting burned out and any suggestions ? By the way j from tier 3 college. Doing java fullstack , system design and learning linux this my day schedule .
r/DSALeetCode • u/samsarvade • Aug 23 '26
Hey everyone, I'm completely new to DSA and using Java. I feel like I'm hitting a massive brick wall. I don't want to just grind questions blindly; I want to actually learn the core patterns (sliding window, two pointers, etc.).
What roadmaps worked for you guys when you were starting out? Also, if anyone wants to team up as accountability partners or knows any chill Discord servers for beginners, let me know!
r/DSALeetCode • u/nerdy-masters • May 24 '26
Every week there’s a new AI tool, framework, or trend people are trying to catch up with. Honestly feels like staying consistent with learning is becoming more important than ever.
That’s why I think using summer to upskill is probably one of the smartest things students can do right now.
Whether it’s:
DSA
AI tools
development
hackathon prep
projects
or just improving practical skills
Even a few months of focused learning can make a huge difference later.
Recently came across the GeeksforGeeks Summer SkillUp 2026 initiative and it honestly looks pretty useful for students wanting a more structured learning path instead of randomly hopping between tutorials.
Registrations are open:
https://www.geeksforgeeks.org/summer-skill-up/
What are you guys planning to learn this summer?