01_00Cheatcode-Book.pdf
1.7 MB
Geeks for Geeks DSA Cheat book
🎙️ Why do interviewers care so much about algorithm and data structures?
Credits: Robin Thomas on Quora, Senior Software Engineer at PropertyGuru
🎙️ Interviewer: Given a file of N items, sort it.
📌 You: sort file.txt
🎙️ Interviewer: What if the list needs 10 MB to store? 100 MB? Maybe 1 GB? Maybe much much more? The list won’t even fit into the main memory of your computer! How to handle this?
📌 You: No problem! sort command uses External merge sort. It divides the list into smaller lists (each smaller list fits in main memory), sorts them individually, and then merge those smaller lists into one big sorted list. My command will work! :)
🎙️ Interviewer: What if the list needs 100 TB of space? It won’t even fit in your hard disk! What to do now?
You: …
📌 It’s actually a pretty simple problem. But the solution is not necessarily simple. The problems faced by these companies are much much harder. And in much larger scale. The knowledge of data structures like Hash Tables, Trees, Tries, Graphs and various algorithms goes a long way in solving these problems efficiently.
📌 Rather than just knowing about these data structures and algorithms, interviewers are more interested in seeing how you use them to solve a problem. Replacing a list with a hash table might mean more revenue for the company. As such, they shall prefer people who are well versed in data structures & algorithms. Limiting yourselves to arrays, stacks and queues won’t get you anywhere.
Credits: Robin Thomas on Quora, Senior Software Engineer at PropertyGuru
🎙️ Interviewer: Given a file of N items, sort it.
📌 You: sort file.txt
🎙️ Interviewer: What if the list needs 10 MB to store? 100 MB? Maybe 1 GB? Maybe much much more? The list won’t even fit into the main memory of your computer! How to handle this?
📌 You: No problem! sort command uses External merge sort. It divides the list into smaller lists (each smaller list fits in main memory), sorts them individually, and then merge those smaller lists into one big sorted list. My command will work! :)
🎙️ Interviewer: What if the list needs 100 TB of space? It won’t even fit in your hard disk! What to do now?
You: …
📌 It’s actually a pretty simple problem. But the solution is not necessarily simple. The problems faced by these companies are much much harder. And in much larger scale. The knowledge of data structures like Hash Tables, Trees, Tries, Graphs and various algorithms goes a long way in solving these problems efficiently.
📌 Rather than just knowing about these data structures and algorithms, interviewers are more interested in seeing how you use them to solve a problem. Replacing a list with a hash table might mean more revenue for the company. As such, they shall prefer people who are well versed in data structures & algorithms. Limiting yourselves to arrays, stacks and queues won’t get you anywhere.
https://fxtwitter.com/ashishps_1/status/1740257104718696611?t=G0ZfTNf8Nccnkg28i-pE1w&s=19
Articles/Blogs to facilitate you're DSA journey 🚀
Articles/Blogs to facilitate you're DSA journey 🚀
FxTwitter / FixupX
Ashish Pratap Singh (@ashishps_1)
If I had to start DSA and Leetcode from scratch, I would begin with these 15 articles to get a head start:
1) Become Master In Linked List: https://lnkd.in/gXQux4zj
2) To Queue Or Not To Queue: https://lnkd.in/gJaGSafT
3) Stacks and Overflows: https:/…
1) Become Master In Linked List: https://lnkd.in/gXQux4zj
2) To Queue Or Not To Queue: https://lnkd.in/gJaGSafT
3) Stacks and Overflows: https:/…