DEV Community

KamauRuth
KamauRuth

Posted on

INTRODUCTION TO DATA STRUCTURES AND ALGORITHIMS.

INTRODUCTION.
Data - Data can be defined as facts or figures, or information that's stored in or used by a computer.

Structures - A structure is used to represent information about something more complicated than a single number, character, or Boolean can do.

Therefore data structures are a way of collecting and organizing data in such a way that we can perform operations on data. Some of the examples that we know include graphs, trees and linked lists.

Types of Data Structures
Linear Data Structures - Items are arranged in a sequence. Example: Array
Non-linear - Data items are not arranged in a sequence. Example: Tree, Graph
Dynamic - It expands or shrinks depending on the program requirements
Static - Are those whose size and structures associated memory locations are fixed.
Algorithms - They are a set of instructions(finite or logical) that are used to solve a problem
Algorithms are said to be efficient and fast when they take less time to execute and consume less memory.

Properties of an Algorithm
Input
Output
Finiteness
Definiteness
Correctness
An algorithm generally requires the following components:

Instruction Space: A space to store the the executable version of the program.
Data Space: Space required to store the constants and variables.
Environment Space: Stores the environment information.

Data Structures and Algorithms come in handy in problem solving.
A problem can be described as something that has an initial state, goal state and the number of steps taken to achieve from the initial to goal state.

Top comments (0)