Coding and Interviews
My thoughts from my experience and learnings
In this post, I want to write about things I’ve realized about how a person can actually tackle the big tech interviews and why should someone learn data structures and algorithms (DSA).
Note: I haven’t cracked a FAANG company or anything but these are my thoughts.
Why should we learn DSA?
In the initial days when I started learning DSA, it was purely to face the big tech interviews so that I can get selected into these big companies, work on some cool technologies, and get paid that lumpsum amount of paycheck and benefits but I was literally failing each of those interviews.
You may say maybe it’s because I wasn’t prepared and it was too early. You are right but something has changed since I started my journey. I started questioning myself, what I am trying to learn, why I am learning DSA and what is a programming language is, and how exactly the program I wrote is translating into machine instructions, and so on and on and I was restless.
Fortunately, these set of videos below helped me understand computer science from its beginning in just 41 videos.
You see all we do when we write a program in any language is to tell a computer to do something specific by following the lines of codes we write which get converted to machine level binary codes and then get executed by the CPU and inturn by logic gates that make up a CPU and as well as GPU when displaying on your screen. All this is possible because of decades of research in Transistors, Compilers, Programming languages, Computer Display technology, and many more things.
Cutting it short, I was satisfied when I got this knowledge. Now it is clear to me what I am learning and why I am learning. You see, the hardware can be improved only so much, Moore’s law is kind of slowed down. The best way to make a computer do something in less time and using fewer resources is to write programs that are memory efficient and can be completed in fewer clock cycles (it is a measure of how fast a computer processor can execute instructions). This is why DSA.
Data Structures and algorithms, having the knowledge of different ways you can structure your data and knowing different algorithms like sorting or graph algorithms and so on would actually enable a person to write code to solve a problem in an efficient way which is actually powerful.
This single factor can distinguish between good and bad programmers (According to me). This made it clear to me why the big tech companies are focused on DSA interviews to pick the cream talent.
What is needed for Interviewing
After going through a learning process, I figured out a pattern on how I can do things a little differently. The pointer I make would be having Java as the Programming language but you can map it to your favorite programming language.
I will also leave a few links as references in between and in the end.
Collections, if a person is programming in Java, he can start with collections and can refer to the book ‘On Java 8’ by Bruce Eckel, in this, he actually laid out the best information possible (According to me). Then one can strengthen the core concepts of DSA topic by topic and I am following the book “Data Structures and Algorithms in Java” by Goodrich, Tamassia, and Goldwasser and youtube videos by William Fiset.
Topics of DSA:
This is all you need to master at least to tackle interview questions.
Arrays, Lists, Linked Lists, Stacks, Queues, Deques, Priority Queues, HashMaps, Asymptotic Analysis, Bit Manipulations, Recursion and Backtracking, Trees — Binary Trees, Binary Search Trees, AVL Trees, Sorting and Searching Algorithms, Graph Algorithms, Binary Search, Greedy Algorithms, Two Pointer, Dynamic Programming, Tries, and Strings.
Remember, along with theoretical learning you should also practice solving problems and I try to solve the below set of problems.
https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions and if you have more time,
Striver's SDE Sheet - Top Coding Interview Problems
(Striver's SDE Sheet - Sheet for the sole purpose of quick revision and preparation in less time focusing on top coding…
and for more information you can refer: https://github.com/jwasham/coding-interview-university
I actually intend to solve a problem starting from brute force and to an efficient solution, just trying all possible ways and I strongly feel this is a way to improve problem-solving skills.
I intend to learn the way mentioned above and write a blog post on each topic I learn every week and who knows the information I put might help some of you.