Professional Documents
Culture Documents
Inroduction in Data Structure
Inroduction in Data Structure
Algorithms
Introduction
What are Data Structures?
“In computer science, a data A way of
structure is a data organizing data
organization, management, and so that it can be
storage format that use effectively.
enables efficient access and
modification.” - Wikipedia
2
What is Algorithm?
“In mathematics and computer A process or set
science, an algorithm is a finite of rules to be
sequence of well-defined, followed in
computer-implementable calculations or
other problem-
instructions, typically to solve a solving
class of problems or to perform a operations,
computation.” - Wikipedia especially by a
computer 3
Array K D
K D
Linked list
4
Data types and
Variables
Data type
“In computer science and It is the type of
computer programming, a data variable that used.
type or simply type is an
attribute of data which tells the
compiler or interpreter how the
programmer intends to use the
data. ” - Wikipedia
6
Variables
“In computer programming, Variable is where
a variable or scalar is a storage the data
location (identified by a memory temporarily save
address) paired with an
associated symbolic name, which
contains some known or unknown
quantity of information referred to as
a value ” - Wikipedia
7
Data Type Size Description
Float 4 bytes Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits
Double 8 bytes Stores fractional numbers. Sufficient for storing 15 decimal digits
Array = 2 4 6 8 100
Int Array[0] = 20
Int Array[1] = -5
20 -5 6 8 100
12
Memory (RAM)
Data Storage 13
14
Memory (RAM)
Data Storage 15
Int a = 1; 1 -> 0000…01 A bit = 1 or 0
-> 32 bit for int
Int b = 4; 2 -> 0000…10
Integers:
Memory is a long tape of bytes 9, 11, 99, 1000, 0, -5
decimals:
2.5, 10.3, 56.9, -65.3
characters:
120 121 122 123 124 ‘R’, ‘T’, ‘U’, ‘p’, ‘c’
Arbitrary number
01010110
A byte Is a small unit of data = 8 bits
11011010
16
Int a = 1; dyna
m icall
Int array[3] = {6, 9, 23} ; y
Int c = 5;
17
18