r/datastructures 17h ago

JAVA DSA and full stack buddies

2 Upvotes

Hello everyone, I started learning Java Full Stack about 6 months ago, but somehow I couldn't complete it. Now that I have started again, I realize that I have forgotten most of the concepts. This time, I have started from scratch and am currently learning OOP concepts. I hope I will be able to complete it successfully this time.

If you're in the same boat, we can connect and help each other stay consistent and learn together.

I also know the MERN stack, through which I completed an internship and some freelance work. Alongside that, I am practicing DSA as well.


r/datastructures 10h ago

Two different Binary Tree implementations side by side

Enable HLS to view with audio, or disable this notification

11 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/datastructures 2h ago

Japanese Algorithm I'm Making

Thumbnail youtube.com
2 Upvotes

r/datastructures 3h ago

How would you restart DSA after taking a long break?

3 Upvotes

Hey everyone,

I could really use some advice from people who've been in a similar situation.

A few months ago, I was consistently practicing DSA and had covered the basics. I was comfortable with patterns like Two Pointers and could usually recognize when to use them.

Then life got in the way, and I took a long break.

Now I need to prepare for NIMCET, which is my top priority, while also getting back into DSA for future internships. Because of that, I can't spend 5–6 hours a day on LeetCode.

My question is:

  • If you had to restart DSA after a long break, how would you do it?
  • Would you restart from Easy problems, or jump straight back into pattern-based practice?
  • Is solving 2–3 quality problems a day enough if I'm also studying for another competitive exam?
  • How would you balance DSA with another major exam without burning out?

Right now, I'm thinking of revising one pattern at a time (Sliding Window → Hash Maps → Binary Search → Trees...) instead of randomly solving problems, but I'd love to hear what worked for you.

Thanks!


r/datastructures 13h ago

DSA Important Topics

31 Upvotes

If you master only these topics...

you'll be prepared for almost every Big Tech interview.

★★★★★ Arrays

★★★★★ Trees

★★★★★ Graphs

★★★★★ DP

★★★★★ Binary Search

★★★★☆ Hashing

★★★★☆ Linked Lists

★★★★☆ Heaps

★★★★☆ Sliding Window

★★★★☆ Greedy

Companies change.

Patterns don't.


r/datastructures 21h ago

Is Strivers A2Z DSA course enough for DSA ?

5 Upvotes

Please guys I've been searching for something good to start dsa.