Data Structure and Algorithm Reviewer
Data Structure and Algorithm Reviewer
Structure
- Set of algorithms that organize data in a certain way
Information - organize
Data Structure – enables efficient access and modification ( ex : Disctionary, Supermarket,
Map )
Main goal of DSA - to minimize the time consumed by searching, sorting and writing data on
our system
Algorithm - set of instructions
Characteristics:
Input
Output
Unambiguity - clear and simple
Finiteness - limited
StructureEffectiveness - impact of every step
Flow:
Input, Process, Output
Algorithm complexity
A. Time complexity
B. Space complexity
- Factors to consider in Space complexity
1. Instruction size - executable program varies depending on number lines
code
2. Data space - store variables size
3. Environment space - store environment information
Linked List - less rigid in their storage structure and element usually are not sotred in
contiguous location
1. Single
2. Circular
3. Double - each has a extra pointer
Stack - LI FO , FI LO
Operations :
push(), pop(), isEmpty(), isfull(), peek(), size()
Queue DS - FI FO , LI LO
Types : Circular, Double ended, Priority