DataStruc Prelim1
DataStruc Prelim1
and ALGORITHMS
It is fundamental to
computational
thinking and
problem-solving in
many facets of life.
Algorithmic Thinking
A derivative of computer science and the process to
develop code and program applications.
String is used to
store sequence of
characters (text).
Primitive Non-Primitive
Created by the
Predefined (already
programmer and is not
defined)
defined
Can be used to call
It cannot call methods. methods to perform
certain operations
It has always a value. It can be null.
starts with an uppercase
Starts with lowercase letter
letter
Sample 2
Sample 4
Posteriori Analysis
Actual statistics like running
Empirical analysis of time and space required
are collected.
an algorithm
T(n) = c ∗ n
Time taken Number of
to execute steps
task
S(P) = C + SP(I)
Fixed Part Variable Part
Space required to Space required by
store certain data variable whose size
and variables. depends on the size
(C) of the problem.
S(I)
Example:
We have one array named " arr" and an
integer " k ". we need to find if that integer
" k " is present in the array " arr " or not?