Looking at the Datastructures- Trees [Math Mondays]
A look into Trees, when they are very useful etc.
Hey, it’s your favorite cult leader here 🐱👤
Mondays are dedicated to theoretical concepts. We’ll cover ideas in Computer Science💻💻, math, software engineering, and much more. Use these days to strengthen your grip on the fundamentals and 10x your skills 🚀🚀.
To get access to all the articles and support my crippling chocolate milk addiction, consider subscribing if you haven’t already!
p.s. you can learn more about the paid plan here. To learn how you can get this newsletter for free, make sure you read till the end (after the poll).
Trees are one of the most powerful data structures in software engineering. Used correctly, trees can be extremely great in a variety of tasks. In today’s edition of Tech Made Simple, we will be covering trees in software engineering. We will talk about what they are, why they are ideal for recursion, the kinds of problems that are best solved with trees, and end with a note about the amazingness of decision trees.
Understanding Trees and their importance in Software Engineering
What are Trees?: I probably don’t need to give you the very basic definitions (nodes, leaf nodes etc). Trees are data structures composed of nodes that are interconnected in a hierarchical manner. Trees are great because they enable efficient organization and retrieval of data. This is a bigger deal than you’d think- because by getting creative with the kind of information we’re working on, we can get some serious results.
Why Recursion goes very well with Trees- Trees are ideal for recursion because of their recursive substructure. Recursion involves breaking a problem down into smaller, self-similar subproblems (we covered the template for solving recursive problems here). This goes well with trees since every node has the same structure (value, left, right). This makes implementing the recursive functions much easier.
Use cases for Trees- Trees are a very versatile data structure. Some notable use cases include:
Hierarchical Data Representation: Trees efficiently represent hierarchical data, such as file systems, organization structures, and parsing programming languages (your compiler creates something called an abstract syntax tree).
Sorting and Searching: This is a no-brainer to those of you familiar with Leetcode. Trees and binary search go hand in hand, but it can be extended further. Since data in trees is structured, it can be used to quickly search through the data for quicker search.
Decision Making with Decision Trees: Decision trees are a powerful tool in machine learning and data mining. They enable efficient classification and regression by partitioning data based on attribute values and making sequential decisions. More on this now.
Decision Trees and AI: Decision Trees are a very special part of AI and Machine Learning. They excel at discerning complex patterns, providing interpretable results, and handling both numerical and categorical data. Their versatility and robustness make them popular in various domains, including finance, healthcare, marketing, and customer segmentation. That's not all though. The power of DTs is the ability to ensemble them together. The two ways- bagging and boosting- each come with their own benefits and have led to some of the most successful models in AI research. My favorite model- Random Forests- is taken from ensembling Decision Trees.
As a developer, there is a lot to learn about Decision Trees and their benefits in software engineering. Look at any system design architecture, and you will see Trees playing a critical component in it.
That is it for this piece. I appreciate your time. As always, if you’re interested in working with me or checking out my other work, my links will be at the end of this email/post. If you like my writing, I would really appreciate an anonymous testimonial. You can drop it here. And if you found value in this write-up, I would appreciate you sharing it with more people. It is word-of-mouth referrals like yours that help me grow. If you refer people using the button below, you will get many cool benefits such as magic swords, dragons, and complimentary premium subscriptions
Save the time, energy, and money you would burn by going through all those videos, courses, products, and ‘coaches’ and easily find all your needs met in one place at ‘Tech Made Simple’! Stay ahead of the curve in AI, software engineering, and the tech industry with expert insights, tips, and resources. 20% off for new subscribers by clicking this link. Subscribe now and simplify your tech journey!
Using this discount will drop the prices-
800 INR (10 USD) → 640 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year (533 INR /month)
Reach out to me
Use the links below to check out my other content, learn more about tutoring, reach out to me about projects, or just to say hi.
Small Snippets about Tech, AI and Machine Learning over here
AI Newsletter- https://artificialintelligencemadesimple.substack.com/
My grandma’s favorite Tech Newsletter- https://codinginterviewsmadesimple.substack.com/
Check out my other articles on Medium. : https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y
My Instagram: https://rb.gy/gmvuy9
My Twitter: https://twitter.com/Machine01776819