Data Structures and How To Build It From Scratch Series #0

Singgih Aji Sasongko
2 min readMay 8, 2022

A data structure is a particular way of organizing data in a computer so that it can be used effectively.

I wrote about Calculating Time Complexity and Space Complexity and its related to this series. I suggest you to read it first if you are not familiar with it. By the way I’m gonna use JavaScript for this series, you may need some adjustment it you use another programming languages.

Some programming languages have built-in data structure, but there are certain programming languages ​​that don’t have a built-in data structure.
For example, JavaScript don’t have Linked List, but Java and C++ do. Thats one of the reason I write this series so we can build data structures from scratch. Here is the list for this series.

  1. Data Structures and How To Build It From Scratch (Array) #1
  2. Data Structures and How To Build It From Scratch (Hash Tables) #2
  3. Data Structures and How To Build It From Scratch (Linked List) #3
  4. Data Structures and How To Build It From Scratch (Stack) #4
  5. Data Structures and How To Build It From Scratch (Queue) #5
  6. Data Structures and How To Build It From Scratch (Trees) #6
  7. Data Structures and How To Build It From Scratch (Graphs) #7

I know you may think about “isn’t array available in all languages?” and you are right! Wouldn’t it be nice to have deeper knowledge how the functions work? Like how Array.push() work and why it has O(1)? How Array.insert() work and why it has O(n)?

I see you on Data Structures and How To Build It From Scratch (Array) #1!

source: https://www.geeksforgeeks.org/data-structures/

--

--