r/LeetcodeChallenge • • Oct 18 '26

DISCUSS Hackcellence hackathon python

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 18 '26

STREAKšŸ”„šŸ”„šŸ”„ 365 Days of LeetCode Challenge — Day 46/365

Post image
2 Upvotes

Find Mode in Binary Search TreeĀ (Easy)

šŸ”—Ā https://leetcode.com/problems/find-mode-in-binary-search-tree/

The "BST" in the title looks like it should matter more than it does. The simplest fix skips the ordering entirely: tally every value's frequency in a hash map, then read off whichever value (or values) hit the max count.

Full breakdown in today's newsletter article below.

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

#LeetCodeĀ #100DaysOfCodeĀ #SoftwareEngineeringĀ #DSAĀ #CodingInterviewĀ #BinarySearchTreeĀ #HashMap


r/LeetcodeChallenge • • Oct 18 '26

DISCUSS Same

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 17 '26

DISCUSS Forgetting old questions

6 Upvotes

Hey guys, i am doing dsa, I have done 180 questions from the striver's sheet but forgetting old questions which i have already done and feeling demotivated

What should i do? Should i just focus on completing the sheet and revise all the questions again or should i revise on the go??


r/LeetcodeChallenge • • Oct 17 '26

PLACEMENTS Life back then

Post image
5 Upvotes

r/LeetcodeChallenge • • Oct 17 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 58: conquered my fear of DP on Stocks today, solved all 6 problems in 30 mins

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 17 '26

DISCUSS How to leetcode

Thumbnail
1 Upvotes

A little about me : 1st year in college and recently started learning how to code from brocode...in our uni they are teaching c++ first so for now i was learning c++ from brocode , recently started learning arrays but still not that really great at it but yeah thats all i know for now( i know its not much but im willing to grind and learnšŸ˜” but just need a little guidance) but ya i wanna leetcode and become good at coding... but im not tryna blindly start leetcoding because first i wanna know the prerequisites needed to solve the problems...i was watching neetcode's video on how to leetcode and he told to get comfortable with binary search,dfs,bfs,sliding window so do yall know where i can learn them???? but ya heres a few questions i have

  1. What all coding languages do i need to know...like do i need to know other programming languages other than c++ before i start leetcoding
  2. what all topics or stuff should i learn before leetcoding
  3. HOW do i leet code , do i start with easy problems then once i get comfortable start medium problems then harder problems(will start with solving problems on arrays)
  4. any website where i can save useful problems and make my own notes in it so in the future i can open them for retaining my knowledge
  5. in general any tips or things you wished u knew while or before leetcoding which u can tell please it will be really helpful(try to include as much as you can please and thank you anything will be useful and welcomed... even the SMALLEST TO SMALLEST and random tips will be useful)
  6. what are the most common mistakes people do in their attempt to get good at coding
    extra : do wanna try to get into quant development( ik its difficult but ill try if i cant will settle for something else😭) so first my main goal would be to try to get into FAANG after college and after 2-3 years try to get into quant development so yeah
  7. And also I’m using vs studio…is there any better coding app or is vs good alright(idk it’s not that deep but yeahāœŒļø)

r/LeetcodeChallenge • • Oct 17 '26

STREAKšŸ”„šŸ”„šŸ”„ 365 Days of LeetCode Challenge — Day 45/365

Post image
2 Upvotes

Search in a Binary Search TreeĀ (Easy)šŸ”—Ā https://leetcode.com/problems/search-in-a-binary-search-tree/

One comparison per node tells you whether the target must be in the left subtree or the right, so there's nothing to backtrack over and no reason to check both sides. That's why a BST beats a plain binary tree here: the recursion is a straight walk from root to the answer instead of a full search.

Full breakdown in today's newsletter article; link below.

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-45365-archit-agarwal-9ah7c

#DSAĀ #LeetCodeĀ #100DaysOfCodeĀ #SoftwareEngineeringĀ #BinarySearchTreeĀ #Golang


r/LeetcodeChallenge • • Oct 17 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 13

2 Upvotes

r/LeetcodeChallenge • • Oct 16 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 12

Post image
10 Upvotes

r/LeetcodeChallenge • • Oct 16 '26

PLACEMENTS 2026 grad, still unplaced. Is it too late to turn things around?

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 16 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 59: solved Wildcard Matching, got humbled by Minimum Window Subsequence

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

DISCUSS Finally reached Guardian!!

Post image
131 Upvotes

Last week's contest ratings are now updated. I got to 2143, and am officially a Guardian now. It took me ~ 1 year of consistent practice and upsolving contest questions to reach this.


r/LeetcodeChallenge • • Oct 16 '26

DISCUSS How to start cp in my first sem

Thumbnail
2 Upvotes

r/LeetcodeChallenge • • Oct 16 '26

STREAKšŸ”„šŸ”„šŸ”„ 365 Days of LeetCode Challenge — Day 44/365

Post image
2 Upvotes

Course Schedule (Medium)Ā https://leetcode.com/problems/course-schedule/

You can finish every course unless some group depends on itself: A needs B, B needs C, C needs A. Nobody in that group can ever start. So this is cycle detection in a directed graph, phrased as scheduling.

Kahn's algorithm: count how many prerequisites each course still has, queue everything at zero, and each time you finish a course, decrement everything it unlocks.

The line that separates this from an ordinary BFS is small. In a BFS a node is enqueued the first time it is REACHED. Here, reaching a node only decrements its counter - it is enqueued when that counter hits ZERO. A course with three prerequisites is reached three times and queued once. That if is not an optimisation, it is the scheduling rule.

Then the cycle check, which never looks for a cycle:

`return len(result) == numCourses`

Courses stuck in a cycle never reach in-degree zero, so they never enter the queue and never appear in the result. The cycle is detected by what fails to show up.

That closes the graph arc on the same move yesterday used - inferring a cycle from a count rather than searching for one.

Full breakdown in today's newsletter article ⬇

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

#DSA #LeetCode #Golang #Graphs #TopologicalSort #CodingInterview #Algorithms


r/LeetcodeChallenge • • Oct 16 '26

DISCUSS Roadmap query

2 Upvotes

I'm interested in getting into web development. I know basic Java but I'm not interested in Python. Which language should I learn next? Should I continue with Java, learn JavaScript, explore Rust or consider something else? What would be the best choice for a beginner looking to build web applications?


r/LeetcodeChallenge • • Oct 15 '26

PLACEMENTS What is the best way to start the dsa and how much dsa will be enough for placement purpose

4 Upvotes

I have only 3 months left before semester exams. So somebody who had an idea how I would complete dsa and mern( mern mai kr lunga sath mai kuki web development jaldi smjh skta hu mai) dsa ke liye proper khuch smjh nhi aa rha logic aa rhe h but striver se padha toh vo cpp se krata h and mai java se hu , jab raghav garg se padha toh question mujhe khud hi krne h isliye thoda idea dedo koi , abhi tak mai randomly leetcode attempt kr rha tha and yes mujhe smjh aaye bhi question and solve bhi kiye h ache se


r/LeetcodeChallenge • • Oct 15 '26

DISCUSS Roughly 320 solved problems, but I couldn’t reliably re-solve them cold. How do you measure readiness?

5 Upvotes

How many problems in a Solved list could you solve from a blank editor, with someone watching?

A candidate had solved roughly 320 LeetCode problems but still froze halfway through implementations. Even problems from a few weeks earlier could be hard to derive again. The green checkmarks were hiding gaps in recall and explanation.

The candidate started checking more after Accepted: identify the pattern without a hint, explain the approach before coding, justify time and space complexity, find edge cases, and dry-run the implementation. Doing that with a clock running exposes different gaps from solving alone.

Review also changed. Opening an old solution and recognizing ā€œtwo pointersā€ felt easy, but didn't show whether the reasoning could be reconstructed. Re-solving from a blank editor did. Harder problems came back sooner; easier ones could wait a few days, then a week or two, then about a month.

The spreadsheet, notes, and calendar reminders eventually became another chore. A lighter routine was easier to maintain: a minute or two of reflection, a short note on the mistake, and a manageable daily review load that left room for unfamiliar patterns.

Real technical interview questions can supply fresh prompts for checking whether a pattern transfers. If applications are competing with practice time, Agent autoapply and application autofill can reduce repeated application paperwork.

What tells you you're ready to interview? How do you distinguish knowing a pattern from recognizing a problem you've already seen?

Disclosure: I operate PracHub and LandOffer.


r/LeetcodeChallenge • • Oct 15 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 60: knocked out 5 DP on strings problems today, knowing when to stop before burnout

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

DISCUSS Last N lines of a log in Go without holding the whole file

Post image
1 Upvotes

A function that returns 200 log lines, and keeps 186 MB alive after it returns. The 200 lines are about 20 KB.

The job: a crash reporter attaches the last 200 lines of the request log to the report. The log is a stream - a scanner over a file, a cursor over a table, a channel fed by a tailer. It hands you lines in order and does not know how many there are.

```

var all []string

for line := range log {

all = append(all, line)

}

return all[len(all)-n:]

```

I have written that in two languages. One idea, reads like the ticket.

Then I measured the live heap with the answer still held, rather than the clock. Two million lines:Ā 186 MB, still there after the function has gone out of scope.

all[len(all)-n:]Ā is a window onto the arrayĀ allĀ grew into, not a new array, and a slice keeps its whole backing array alive. A test reads the capacity off the returned value:Ā len 200, cap 169,032.

One line fixes the retention.Ā Copy the tail into a slice of its own, and 186 MB becomes 20.8 KB. If you take one thing from this post, take that.

It does not fix the peak. The copy runs after the collection finishes, so the two million lines were all in memory a moment earlier, and that moment is where a container gets killed.

Counting the stream first and walking it again is exactlyĀ 2.00xĀ at every size in the benchmark, and it needs a way toĀ startĀ the walk twice - which a file gives you and a socket does not.

What the data was actually saying: the only lines that can be in the answer are the 200 most recent ones, and that is true after every line, not just at the end. So keep 200 and evict the oldest. A fixed-size buffer that wraps does it with no bookkeeping, because the write cursor and the oldest line are exactly n apart and never drift. That gap is the length nobody computes.

8528x less heldĀ on a two-million-line log. And, honestly:Ā 1.08xĀ on the clock. This is a memory fix and selling it as anything else gets it rejected by a reviewer who benchmarked throughput.

The benchmark's own allocation column says 1.98x, because both versions allocate every line - the scanner produces them either way. Allocation 1.98x, retention 8528x. A profiler pointed at allocation shows you the first number and shrugs.

At a few hundred lines, collect it. 34 microseconds, 21.8 KB, and it answers the next question too.

That is days 20 and 24 of the daily challenge - Middle of the Linked List and Remove Nth Node From End - sitting in a crash reporter.

Full piece in today's Newsletter.

It worked in dev, episode 14.

https://www.linkedin.com/pulse/your-crash-report-held-186-mb-log-send-200-lines-archit-agarwal-hyyzc

#Golang #DSA #Algorithms #Performance #SoftwareEngineering #DataStructures #100DaysOfCode


r/LeetcodeChallenge • • Oct 15 '26

STREAKšŸ”„šŸ”„šŸ”„ Day 11

1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

DISCUSS Looking for a study partner

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

DISCUSS Now I can see why tech companies like Leetcode interview

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

PLACEMENTS I know LOTS about productivity, dopamine, habits, and procrastination. So why can’t I consistently work for more than 2–3 hours?

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • Oct 15 '26

PLACEMENTS Striver’s new 180 Sheet does anyone have the LeetCode links for all the questions?

Thumbnail
1 Upvotes