Data Structures

The Types of Data Structures

Arrays

  • Good for storing similar data.
  • O(1) accessing.
  • Cannot change size of array after initializing.
  • Slow insertion and deletion.
  • Wasted storage space if there are empty spaces in array

A sequential access data structure.

The Stack

  • Quick insertion and deletion.
  • Slow for searching and accessing.

The Queue

  • Quick insertion and deletion.
  • Slow for searching and accessing.

Linked List

  • Backs other data structures.
  • You can only go forward with pointers.

Doubly-Linked List

Dictionaries

  • Don’t use numerical indexes.
  • Keys are flexible in which they can be any data type.
  • If implementing a hash table or hash function it is the most efficient data structure.
  • More advanced terms to learn to use efficiently.

Trees

Tries

Heaps

Graphs

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store