Posts What are Data Structures ?
Post
Cancel

What are Data Structures ?

Data Structure Introduction:

Data structure is a systematic way to organize data to use it efficiently. There are two main data types, Built-in Data Type and Derived Data Type. In other words a data structure is a collection of values in a container. Each container/type of data structure is better at applying some functions that others. For example, a fridge (data structure) is better at storing ice-cream (data) than papers (data). Storing papers(data) is better than in a file (data structure).

Built-in Data Structures are supported by the built-in language and are integers, Boolean, Floating, Characters and Strings.

Derived Data Structures are those which can be implemented independently like List, Array, Stack and Queue.

Basic operations of data structure include Access, Traversing, Searching, Insertion, Deletion, Sorting and Merging. Traversing refers to the iterating over a collection of data. Searching on the other hand is an accelerated lookup, where an index is used to jump directly to the results of interest. Each data structure and operation has a Big O notation. For example the average access of Arrays os O(1), while the average access of stacks is O(n). There is also space complexity for the data structures.

Data Structure TypeSub-TypeExamples
Built-in Data Structure-Integer, Float, Character, String
Derived Data StructureLinear Data StructureStatic - Arrays or Dynamic- Linkedlist, Queue and Stack
Derived Data StructureNon-Linear Data StructureTrees, Graphs, Tables and Tries

Note: Python has it a little bit different when it comes to data types. For example, python uses list as Dynamic arrays, stacks, queues. The Hash Table is dictionary.

The characteristic of data structure is three, correctness, time complexity and space complexity.

Time Complexity − Running time or the execution time of operations of data structure must be as small as possible.

Space Complexity − Memory usage of a data structure operation should be as little as possible.

We cover the Time Complexity and Space Complexity in more details in the BigO article.

Summary diagram of Data Structure Big O notations

sort9

This post is licensed under CC BY 4.0 by the author.