10 Key Data Structures We Use Every Day
- list: keep your Twitter feeds
- stack: support undo/redo of the word editor
- queue: keep printer jobs, or send user actions in-game
- hash table: cashing systems
- Array: math operations
- heap: task scheduling
- tree: keep the HTML document, or for AI decision
- suffix tree: for searching string in a document
- graph: for tracking friendship, or path finding
- r-tree: for finding the nearest neighbor
- vertex buffer: for sending data to GPU for rendering
Over to you: Which additional data structures have we overlooked?
--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/FIzCeaWsZV
20 ChatGPT prompts that use next-level mental models to help you make strategic business decisions:
1. Second-Order Thinking
Prompt: "Apply Second-Order Thinking to assess [my business decision]. Consider not only the immediate consequences but also the second-level consequences that may arise."
2. Pareto Principle (80/20 Rule)
Prompt: "Use the Pareto Principle to evaluate [my business decision]. Focus on the 20% of factors that could be responsible for 80% of the results."
3. First Principle Thinking
Prompt: "Use First Principle Thinking to evaluate [my business decision]. Rethink the problem from the ground up and separate the underlying facts from the assumptions made based on them."
4. Regret Minimization Framework
Prompt: "Use the Regret Minimization Framework to assess [my business decision]. Think long-term and weigh the emotional impact to minimize future regret."
5. Opportunity Costs
Prompt: "Assess [my business decision] by considering the Opportunity Costs. Think about the costs arising from choosing this option against every other option available."
6. The Sunk Cost Fallacy
Prompt: "Assess [my business decision] while avoiding the Sunk Cost Fallacy. Evaluate the decision based on future value, not past costs."
7. Occam's Razor
Prompt: "Apply Occam's Razor to assess [my business decision]. Choose the less complex explanation or option that satisfies the conditions without unnecessary multiplication."
8. Systems Thinking
Prompt: "Use Systems Thinking to assess [my business decision]. View the problem as part of an interconnected system and understand how variables influence one another."
9. Inversion
Prompt: "Utilize Inversion to analyze [my business decision]. Look at the problem from the endpoint instead of the starting point and ask: 'What must I avoid?' rather than 'What do I need to do?'"
10. Leverage
Prompt: "Analyze [my business decision] through the lens of Leverage. Determine how the right lever can amplify my efforts and lead to significant outcomes."
11. Circle of Competence
Prompt: "Apply the Circle of Competence to analyze [my business decision]. Make sure the decision aligns with [my areas of expertise]. Straying outside of my circle can lead to poor decisions."
12. Law of Diminishing Returns
Prompt: "Evaluate [my business decision] using the Law of Diminishing Returns. Consider the turning point where additional investments offer less value and costs may rise."
13. Niches
Prompt: "Analyze [my business decision] focusing on Niches. Determine how specialization within a niche can lead to expertise and success in this context."
14. Margin of Safety
Prompt: "Use the Margin of Safety to evaluate [my business decision]. Assume that your assumptions might be wrong and plan with a safety margin to mitigate risks."
15. Hanlon's Razor
Prompt: "Evaluate [my business decision] through Hanlon's Razor. Don't assume ill intent when mistakes can be explained by ignorance or error."
16. Randomness
Prompt: "Evaluate [my business decision] with the concept of Randomness in mind. Remember that not everything follows cause-effect relationships and some outcomes may be random."
17. Critical Mass
Prompt: "Analyze [my business decision] by considering Critical Mass. Recognize if you are at a point where momentum may become self-sustaining."
18. The Halo Effect
Prompt: "Evaluate [my business decision] while considering the Halo Effect. Recognize how impressions in one area can bias judgment in others."
19. Feedback Loops
Prompt: "Analyze [my business decision] through the understanding of Feedback Loops. Consider how actions and reactions within the system can influence subsequent decisions."
20. Scarcity and Abundance Mindset
Prompt: "Evaluate [my business decision] considering both Scarcity and Abundance Mindset. Reflect on how your mindset can influence the decision-making process."
8 Key OOP Concepts Every Developer Should Know
Object-Oriented Programming (OOP) has been around since the 1960s, but it really took off in the 1990s with languages like Java and C++.
Why is OOP Important? OOP allows you to create blueprints (called classes) for digital objects, and these objects know how to communicate with one another to make amazing things happen in your software. Having a well-organized toolbox rather than a jumbled drawer of tools makes your code tidier and easier to change.
In order to get to grips with OOP, think of it as creating digital Lego blocks that can be combined in countless ways. Take a book or watch some tutorials, and then practice writing code - there's no better way to learn than to practice!
Don't be afraid of OOP - it's a powerful tool in your coder's toolbox, and with some practice, you'll be able to develop everything from nifty apps to digital skyscrapers!
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/4QcX8btXGL
🔴 LaTeX for Python 🐍
🟡 Maths descriptions for functions
🟢 Jupyter Notebook 📒 in 2nd Tweet
💫 It's a powerful tool for documenting your code 🚀
Check this out 👇