r/DSALeetCode 18h ago

Contestssss:(

5 Upvotes

What according to u is the best time to start taking up contests. I recently gave one and got totally smooshed. RECOMMENDATIONS PLSS!!!!


r/DSALeetCode 23h ago

Demotivated :(

4 Upvotes

Started following strivers a to z DSA playlist a month ago. Initially it felt easy but now feels more like a burden. Cant comeup with an optimal solution on my own. I canโ€™t recognise the pattern and then end up seeing solution โ€ฆwhat would u all suggest me...


r/DSALeetCode 15m ago

Trouble to do dsa questions

Thumbnail
โ€ข Upvotes

r/DSALeetCode 17h ago

Two different Binary Tree implementations side by side

Enable HLS to view with audio, or disable this notification

2 Upvotes

The same tree represented in two very different ways visualized using ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜†_๐—ด๐—ฟ๐—ฎ๐—ฝ๐—ต: Binary Trees

๐Ÿ”— Binary Tree as Nodes: The tree is built out of multiple node objects. Each node stores its value and two references, one to its left child and one to its right child.

๐Ÿ“ฆ Binary Tree as List: The tree is stored in a single list or array. Instead of references, indices represent the relationships between nodes. For a node at index, its children can be found using a simple calculation: - Left child: 2 * index + 1 - Right child: 2 * index + 2

So, when should you use which representation?

The node-based version makes the structure explicit and intuitive. It is great for education: students can clearly see how nodes are connected while practicing classes and references/pointers. It is flexible and works particularly well for irregular or sparse trees. It is the clearest representation when learning how trees work.

The list-based version can be very efficient for (nearly) balanced trees. It does not need to store child references, requires fewer separate memory allocations, and keeps values close together in memory for improved cache performance.

The same abstract data structure, but with very different trade-offs in clarity, flexibility, and performance.

Which representation would you use?


r/DSALeetCode 2h ago

Looking for a serious DSA + Interview Prep Partner (Java | 1.5 YOE | India)

1 Upvotes

Hi everyone!

I'm a Software Engineer with around 1.5 years of experience and I'm starting my preparation to switch to a product-based company.

I'm looking for a serious accountability partner, preferably from Bangalore, who's also preparing for product company interviews and is committed to staying consistent.

About me:

Currently working at a service-based company

Language: Java

Time Zone: IST (India)

Current level: Comfortable with basic DSA

Goal: Crack product company interviews in the next 3โ€“4 months

Plan:

Solve DSA problems consistently

Discuss approaches and optimizations

Keep each other accountable

We can decide the exact schedule and roadmap together based on what works best for both of us.

If you're genuinely committed and interested, feel free to DM me.


r/DSALeetCode 15h ago

I am beginners in DSA striver sheet

1 Upvotes

Help me how to learn patterns from any questions


r/DSALeetCode 20h ago

Preparing for technical interviews need help!

Thumbnail
1 Upvotes