Data structures and algorithms are important, but it is not always easy to grasp their main ideas. This “I’m Preparing for FAANG “series will help you not just learn data structures and algorithms but also dive into their philosophy. The final purpose of this series is to help you achieve your goal: To pass FAANG interviews.
This is the first and most foundational lesson from the series. In this tutorial, you’ll understand what exactly a data structure is and how we interact with it.
Getting started with Data structures
Data structure is simply a way of structuring data. What does it mean? It means they are essentially how data is stored, retrieved, and organized.
Data is always important. In software development, we usually work with different data structures, and using different algorithms, we interact with this data. Whether it is a small application like a utility tool, a huge web application that serves billions of people, or a machine learning model, the manipulation and management of data is a crucial process of our system.
The purpose of interacting with data defines its structure. You may need the fastest way of getting data, or you don’t care about retrieving it, but your focus is on storing the data/ writing the data.
When you first learn data structures, you may come up with a foundational question: Why do we have so many data structures out there?
Well, the choice of a data structure depends heavily on how the data will be used. So, The actual reason is your business/requirements. Consider the following cases:
- If you need the fastest way of retrieving data, you can pick tables or arrays
- If your main focus is storing the data, linked lists or compressed tries may be a relevant choice for you
- If you need to maintain the order, data structures like binary search trees or sorted arrays are often used.
- If your data grows unpredictably, you may pick dynamic arrays or linked lists.
As you might guess, the requirement for the data structure is the main case here. That is why we have a lot of data structures, and that is why you should deal with so many data structures throughout your learning and working process.
Getting started with Algorithms
Data structures alone are not sufficient. What is the purpose of picking up the most suitable data structure if you don’t have a way of interacting with it? Well. That is why we need algorithms to interact with this data effectively.
We encapsulate the following logic inside our algorithms:
- How quickly can new data be inserted into the structure? For example, inserting data into an array is faster than inserting it into a sorted linked list.
- Can we remove elements efficiently?
- How about sorting and searching? Algorithms like binary search, merge sort, and quicksort are important when it comes to large datasets.
- How fast can we access the element? Searching for an element in a table is faster than a sequential search through an array.
Random Access memory
We mostly structure data inside a RAM. RAM stands for Random Access Memory. The performance of our application heavily depends on how well the data structure is utilized by RAM. There is no single way of interacting with RAM when it comes to data structure and RAM communication. Almost every data structure interacts with RAM in a unique way that affects performance, memory usage, and system efficiency.
We temporarily store data and instructions inside RAM for quick access to the CPU.
Data structures stored in RAM are accessed faster compared to other storage like hard drives, etc. So, RAM’s speed and organization directly affect how effectively data structures perform operations like read, search, delete, etc.



Join the conversation! Your thoughts help the community grow.