Data Structure in Python Introduction

Linked List

Stack

Queue

Tree

Graph

Hashmaps

Reading: Data Structure in Python


Imagine someone is developing a contact management application, such as a contact or digital phone book. Keep in mind when someone wants to store contact information, such as name, phone number, email address, and physical address. Then if you want to do various operations on it, such as adding a new contact, searching for contacts by name or number, deleting existing contacts, or changing the details of a contact. In this case, the selection of the appropriate Data Structure and the appropriate understanding of how to use the data structure can certainly help the process of developing an efficient, readable, reliable, and interconnected contact management application. The implementation of the Data Structure will certainly affect the performance and functionality of the application created.

What is Data Structure?

Data Structure or known as data structure in Python programming language has an understanding is a way to store, manage, and organize a data in a line of a collection of programs created. Data Structure is also a container or object used to store a collection of data in various structured forms that allow a developer to perform operations and manipulate data effectively and efficiently. Different data structures have different characteristics and uses as well; therefore, Python provides several types of data structures that are often used by other programming languages, including:

A. Linked List

Data Structured Linked List is a way to store data with a structure that allows developers and program makers to directly or automatically create a new place for data when needed. Data Structured Linked List is also a data structure consisting of a collection of data record arrangements where each record has a field that can store the address or reference of the next record and according to the specified order. The data linked to a linked list can be called a "node," and each linked list has the terms "head" and "tail."

Illustration of the application of Linked List. Source: Mikirin Kode

Illustration of the application of Linked List. Source: Mikirin Kode

B. Stack

Stack is a Data Structure that has the nature of LIFO (Last in First Out), which means if there is a data that enters / input in the last order, then as a form of output or out owner will be the first data to be issued.