How to reuse one things everywhere?

12 hours ago 3
ARTICLE AD BOX

I been learning OOPs, I kind of start to things can we use only one class for a Nodes and reuse it again for all DSA like linked List, trees, binary, without type nodes in there sub class ?

Also I'm aware of, we need to use interface to reuse again and again but im stuck to get those concepts correctly even after reading in many websites. Pls someone explain this concept simple and more detail

Ex:

public class DoubleLinkedList extends Node{ ...}

public class BinaryTree extends Node{ ...}

Read Entire Article