0% found this document useful (0 votes)
5 views1 page

Search and Sort Algorithms Guide

The document provides an overview of searching and sorting algorithms, including Linear Search, Binary Search, Bubble Sort, and Merge Sort. It also includes a pseudocode example for implementing the Binary Search algorithm. The guide serves as a reference for understanding basic algorithm concepts and their implementations.

Uploaded by

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

Search and Sort Algorithms Guide

The document provides an overview of searching and sorting algorithms, including Linear Search, Binary Search, Bubble Sort, and Merge Sort. It also includes a pseudocode example for implementing the Binary Search algorithm. The guide serves as a reference for understanding basic algorithm concepts and their implementations.

Uploaded by

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

Algorithm Flowcharts and Pseudocode Guide

1. Searching Algorithms:

- Linear Search: Check each item one by one

- Binary Search: Divide and conquer (sorted lists only)

2. Sorting Algorithms:

- Bubble Sort: Swap adjacent if out of order

- Merge Sort: Divide list, sort sublists, merge

3. Pseudocode Example:

function binarySearch(arr, target):

low = 0, high = len(arr)-1

while low <= high:

mid = (low+high)//2

if arr[mid] == target: return mid

elif arr[mid] < target: low = mid + 1

else: high = mid - 1

return -1

You might also like