🔸A tree
The nodes that give birth to other nodes under them is called a "parent node" and its children are simply called "daughter node" or "children nodes". The main stem of the tree is called the "root node".
🔸Family
The family of Mr. Alpha can be represented as a tree where Mr. Alpha has two children - Mr. Charlie and Mr. Romeo and similarly they both have two children.
🔸A hierarchical company structure
🔸An organism classification tree
🔸A Tree Corresponding to the Markup Elements of a Web Page
🔸Folder structure in an Operating system
🔸An XML Tree structure
🔸 Decision-based algorithm used in machine learning
🔸Database indexing
In database indexing, B trees are used to sort data for simplified searching, insertion, and deletion
🔸DNS Servers
Domain Name Servers (DNS) also use tree structures.
🔸Quora comments
Posting questions on quora, the comments are child of questions
🔸Comments on Twitter
The comment to a tweet on Twitter is a child of that tweet and similarly, a reply to your comment is your child of that comment
🔸Routing tables
A routing table is used to link routers in a network. It is usually implemented with a trie data structure.
The tree data structure will store the location of routers based on their IP addresses. Routers with similar addresses are grouped under a single subtree.
🔸Data compression using Huffman coding
This is the end of the thread.
Real-life examples for other data structures coming soon. Be sure to give a follow to @meetjain74
After making m1 = null m1 becomes eligible for garbage collection. So when we call garbage collector the first time, Garbage Collector will call finalize() method on m1 before destroying it.
The finalize method will print "Finalise" here but in finalize method we are again referencing the same object by m which makes it no longer eligible for garbage collection. Hence the garbage collector will not destroy the object.
Confused about implementing data structures in real problems?
See some real-world examples of the Data structure "Array" today 👇
A thread 🧵
🔸A parking lot is an example of an array with each index of the array storing whether a car is present or not. Or it may be used for some other functionality.
Want to become an Android developer or start your journey with Android development but have not started yet?
Let me help you create your first Android app to kick off your Android journey.
Work with me to the end of the thread 🧵🧵
First, download Android Studio on your PC through this link and complete the setup and wait for all indexing and initial build to finish (might take time so keep patience) developer.android.com/studio
🔸Click on create new Project
🔸Select Empty Activity
🔸Click on next