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

NAME : MORSHED ARAFIN

ID : 20191010010
SEC : A
Second Pattern Matching Algorithm

 By this second pattern matching algorithm


we can find out if a Pattern exists in a
String or not And if exist we can find out
the Position of the pattern in the string.
Bubble sort
 Bubble sort is an algorithm that compares the adjacent elements
and swaps their positions if they are not in the intended order.
The order can be ascending or descending.
 Starting from the first index, compare the first and the second
elements. If the first element is greater than the second element,
they are swapped.
Now, compare the second and the third elements. Swap them if
they are not in order.
The above process goes on until the last element.

 The same process goes on for the remaining iterations. After


each iteration, the largest element among the unsorted elements
is placed at the end.
In each iteration, the comparison takes place up to the last
unsorted element.
The array is sorted when all the unsorted elements are placed at
their correct positions.
Postfix Expression
 Postfix notation is a notation for writing
arithmetic expressions in which the
operands appear before their operators.
Using Stacks. Postfix notation is
a notation for writing
arithmetic expressions in which the
operands appear before their operators.
Infix Expression
 Infix, Postfix and Prefix notations are three
different but equivalent ways of
writing expressions. It is easiest to
demonstrate the differences by looking at
examples of operators that take two
operands. Infix notation: X + Y.
Binary Search Tree
 A Binary Search Tree (BST) is a tree in which
all the nodes follow the below-mentioned
properties − The value of the key of the left
sub-tree is less than the value of its parent
(root) node's key. The value of the key of the
right sub-tree is greater than or equal to the
value of its parent (root) node's key.
Thank You

You might also like