Advanced Data Structures and Algorithms

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Advanced Data

Structures and
Algorithms
CHRISTIAN LESTER D. GIMENO
What is a Data
Structure?
A data structure is a format of
storing, organizing, transforming
and retrieving data in a
computer so that it can be used
efficiently.
Popular Data Structures:
 Arrays
 List
 Linked List
 Stack
Queue
 Queue Array

 Tree
 Graph
 Hashing Linked-List
What is an
Algorithm?
A set of detailed, unambiguous and
ordered instructions developed to
describe the processes necessary to
produce the desired output from the
given input.

Input Algorithm Output


Algorithms:
Sorting (Quick Sort) Searching (Binary Search)
Graph (A* or A Star) Clustering (K-Means)
Compression (Huffman Coding)
Encryption (RSA – Rivest-Shamir-Adleman)
Image Recognition (ImageNet Classification with Deep
Convolutional Neural Networks)

Face Recognition (Local Binary Patterns Histograms)


Image Enlarger(Bilinear and bicubic algorithms)
Data Mining (Apriori Algorithm)
It is the amount of time for an
algorithm to finish its execution.
The running time of an algorithm for a
specific input depends on the number
of operations executed. The greater
the number of operations, the longer
the running time of an algorithm.
for(i=0;i<(n*n);i++)
{
s = s * i;
}
Execution Time Cases
There are three cases which are usually used to compare various
data structure's execution time in a relative manner.

 Worst Case −
 Average Case −
 Best Case −
Worst Case − This is the scenario where a particular
data structure operation takes maximum time it can
take. If an operation's worst case time is ƒ(n) then this
operation will not take more than ƒ(n) time where
ƒ(n) represents function of n.
Execution Time Cases
 There are three cases which are usually used to compare various data
structure's execution time in a relative manner.

 Worst Case − This is the scenario where a particular data structure


operation takes maximum time it can take. If an operation's worst case
time is ƒ(n) then this operation will not take more than ƒ(n) time where
ƒ(n) represents function of n.

 Average Case − This is the scenario depicting the average execution


time of an operation of a data structure. If an operation takes ƒ(n) time
in execution, then m operations will take mƒ(n) time.

 Best Case − This is the scenario depicting the least possible execution
time of an operation of a data structure. If an operation takes ƒ(n) time
in execution, then the actual operation may take time as the random
number which would be maximum as ƒ(n).
Execution Time Cases
 There are three cases which are usually used to compare various data
structure's execution time in a relative manner.

 Worst Case − This is the scenario where a particular data structure


operation takes maximum time it can take. If an operation's worst case
time is ƒ(n) then this operation will not take more than ƒ(n) time where
ƒ(n) represents function of n.

 Average Case − This is the scenario depicting the average execution


time of an operation of a data structure. If an operation takes ƒ(n) time
in execution, then m operations will take mƒ(n) time.

 Best Case − This is the scenario depicting the least possible execution
time of an operation of a data structure. If an operation takes ƒ(n) time
in execution, then the actual operation may take time as the random
number which would be maximum as ƒ(n).

You might also like