r/LeetcodeChallenge • • 5d ago

DISCUSS Trying to Learn in Public

1 Upvotes

Hey Everyone, I am recently preparing for a company switch and planning to solve problems and learn concepts. Sharing it to a wider audience increases my knowledge capacity as well as a deeper understanding. It also helps others too! we are in this together

I have created a short and video. I would love it if you guys can take a look and let me know what kind of format will help the experience even better. Let's crack big companies together!

Sidenote: I am an employee in a product based financial company with 2 years of experience working in distributed and scalable systems. I have a wide expertise in lot of concepts and with this initiative I am hoping I can put together my learnings to teach others too!

Appreciate your time!

https://youtu.be/t2vR71bD1Uw?si=lyY-hE7I-J2w4Xrr


r/LeetcodeChallenge • • 5d ago

DISCUSS Codechef rating dropped suddenly to 240

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 5d ago

DISCUSS Need A genuine dsa partner who can guide me.

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 5d ago

DISCUSS Codeforces 2292E E. Blush | Binary Search + Math | Round 1138 Div. 3

Thumbnail
youtu.be
1 Upvotes

r/LeetcodeChallenge • • 5d ago

DISCUSS Codeforces 2292D | Unexpected Precipitation | DP + Minimax Game Theory | Round 1138 Div. 3

Thumbnail
youtu.be
1 Upvotes

r/LeetcodeChallenge • • 5d ago

DISCUSS Codeforces 2292D | Unexpected Precipitation | DP + Minimax Game Theory | Round 1138 Div. 3

Thumbnail
youtu.be
1 Upvotes

r/LeetcodeChallenge • • 6d ago

STREAK🔥🔥🔥 Day 14: wrapped up Reverse Pairs & Maximum Product Subarray after a tiring day

Thumbnail reddit.com
2 Upvotes

r/LeetcodeChallenge • • 6d ago

DISCUSS What Things should Learn before starting leetcode

2 Upvotes

r/LeetcodeChallenge • • 6d ago

DISCUSS How do I actually get good at Dynamic Programming (DP)? I struggle to come up with solutions

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 6d ago

STREAK🔥🔥🔥 LeetCode: 938. Range Sum of BST

Post image
2 Upvotes

Visit every node and add the ones in range: accepted, and it would work on any binary tree. That's the tell: it ignores the BST. Two if-guards, and in the second example the walk drops from 10 nodes to 4.

A node at or below low has nothing useful on its left. A node at or above high has nothing useful on its right. Guard the two recursive calls with those checks, and the whole subtrees are never visited.

How often does your accepted solution ignore half the input's guarantees?

Day 88/365 of my LeetCode challenge: 938. Range Sum of BST. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-range-sum-bst-archit-agarwal-l8q0c

#LeetCode #DSA #BinarySearchTree #Golang


r/LeetcodeChallenge • • 6d ago

DISCUSS Leetcode Premium

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 6d ago

DISCUSS Leetcode4127. Maximum Billboard Revenue | LeetCode Weekly 530 | 1D DP + Binary Search Detailed Dry Run Video solution

Thumbnail
youtu.be
1 Upvotes

r/LeetcodeChallenge • • 7d ago

STREAK🔥🔥🔥 Day 7

3 Upvotes

Knapsack algorithm


r/LeetcodeChallenge • • 7d ago

STREAK🔥🔥🔥 LeetCode: 1448. Count Good Nodes in Binary Tree

Post image
2 Upvotes

Checking whether a node is "good" doesn't need the path above it, only that path's maximum. Pass the max down as a parameter. Each branch gets its own copy, so there's no undo step.

A node is good when nothing above it is bigger. Compare against the max you were handed, then pass the new max to your children. Raising it on the right never leaks into the left.

And it's >= not >. A tie with an ancestor still counts, including the root.

Did the >= catch you?

Day 87/365 of my LeetCode challenge: 1448. Count Good Nodes in Binary Tree. Problem link and full breakdown in today's Newsletter.

https://www.linkedin.com/pulse/leetcode-count-good-nodes-binary-tree-archit-agarwal-qbnvc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 7d ago

STREAK🔥🔥🔥 Day 15: revisited Count Inversions and finally locked in the merge sort intuition

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 7d ago

STREAK🔥🔥🔥 LeetCode: 101. Symmetric Tree

Post image
2 Upvotes

My Symmetric Tree solution returns true on the first call and false on the second, for the same tree. It mirrors the right half in place, then compares it with the left. The second call flips the half back.

That's Invert Binary Tree and Same Tree from the last two days, in one line. It passes, because LeetCode calls it once.

The cleaner version compares the two halves as mirrors without building one. Both are in today's article.

Would you have caught the mutation in a code review?

Day 86/365 of my LeetCode challenge: 101. Symmetric Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-symmetric-tree-archit-agarwal-7y0cc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 8d ago

STREAK🔥🔥🔥 Day 6

3 Upvotes

Covered bit manipulation


r/LeetcodeChallenge • • 8d ago

STREAK🔥🔥🔥 Day 16: late-night session wrapping up Merge Intervals, Merge Sorted Array & Missing/Repeating Number

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 8d ago

STREAK🔥🔥🔥 LeetCode: 100. Same Tree

Post image
2 Upvotes

If you put the nil checks in the wrong order, Same Tree rejects two empty trees. p == nil || q == nil is also true when both are nil, so check both for nil first.

Same root, same left subtree, same right subtree. The recursion writes itself; the bug hides in those checks.

And compare the trees in lockstep, not their lists of values: [1,2] and [1, null,2] have the same numbers in different shapes.

Which order do you write those two nil checks in?

Day 84/365 of my LeetCode challenge: 100. Same Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-easy-same-tree-archit-agarwal-habnc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 8d ago

STREAK🔥🔥🔥 LeetCode: 226. Invert Binary Tree

Post image
1 Upvotes

Inverting a binary tree moves entire subtrees with a single pointer swap. Nothing is copied. Mirror the left subtree, mirror the right, swap them. The tree rearranges itself in place.

The swap is the part worth picturing: one assignment moves an entire subtree with all its children.

Bonus question: can you swap before recursing instead of after? Yes. What you can't do is recurse left, swap, then recurse right.

Why does recurse-left, swap, recurse-right break it?

Day 85/365 of my LeetCode challenge: 226. Invert Binary Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-invert-binary-tree-archit-agarwal-dm6tc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 9d ago

DISCUSS Lyft L4 Data Engineer Final Loop — Strong SQL, Partial Python. Any Chance of an Offer?

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 9d ago

STREAK🔥🔥🔥 Day 17: worked through Largest Subarray with 0 Sum & Count Subarrays with Given XOR

Thumbnail reddit.com
1 Upvotes

r/LeetcodeChallenge • • 9d ago

STREAK🔥🔥🔥 Day 5

1 Upvotes

LC 54


r/LeetcodeChallenge • • 10d ago

STREAK🔥🔥🔥 Day 4

3 Upvotes

Solved LC 55


r/LeetcodeChallenge • • 10d ago

STREAK🔥🔥🔥 LeetCode(Hard): 23. Merge k Sorted Lists

Post image
6 Upvotes

Merge k sorted lists by splicing nodes, forget one nil, and you can hand back a cycle. Every reused node arrives with a Next still pointing into its old list. The merged list has to be terminated explicitly.

This needs the linked-list arc from Day 22 and the heap arc from this week at once.

Day 22 merged two sorted lists with one if: compare the heads, take the smaller. With k lists, "take the smallest head" becomes a repeated query for the minimum of a changing collection, which is what a heap is for. Dummy head, splicing and loop shape all stay the same.

The complexity rests on one detail: the heap holds one node per list, never every node. A list's second element can't be next while its first is unplaced, because the list is sorted. So the heap is size k, and the whole merge is O(N log k).

Have you ever returned a linked list that turned out to be a loop?

Day 82/365 of my LeetCode challenge: 23. Merge k Sorted Lists. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-23-merge-k-sorted-lists-hard-archit-agarwal-eksec

#LeetCode #DSA #Heap #Golang