0% found this document useful (0 votes)
8 views13 pages

Recursive Euclidean Algorithm Flowchart

The document discusses various recursive algorithms, including the Euclidean algorithm, linear search, bubble sort, and insertion sort, providing examples, flowcharts, and pseudocode for each. It emphasizes the importance of base cases and methods to reduce input size in recursive functions. Additionally, it contrasts recursive approaches with iterative methods, particularly in binary search.

Uploaded by

Sheikh Haris
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views13 pages

Recursive Euclidean Algorithm Flowchart

The document discusses various recursive algorithms, including the Euclidean algorithm, linear search, bubble sort, and insertion sort, providing examples, flowcharts, and pseudocode for each. It emphasizes the importance of base cases and methods to reduce input size in recursive functions. Additionally, it contrasts recursive approaches with iterative methods, particularly in binary search.

Uploaded by

Sheikh Haris
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Recursive Algorithms:

Examples
Recursive Euclidean Algorithm
Flowchart of Euclidean algorithm
Pseudocode of Euclidean Algorithm
Recursive Pseudocode of Euclidean
Algorithm
Base Case
Recursive Linear Search

New Array(Input)
Recursive Linear Search

l is just going to tell us


where the first element
of the vector is that we
care about.
Recursive Bubble Sort
Q: How to reduce the size of the input to the problem using recursion?

New Array(Input)
Recursive Bubble Sort: Swap
function
Recursive Bubble Sort: Pseudocode
Base Case
Recursive Insertion Sort: Shift
Function
Recursive Insertion Sort:
Pseudocode

• Mixture of recursion
and iteration to give a
simple implementation.
Iterative Binary Search: Pseudocode
Recursive Binary Search:
Pseudocode

You might also like