Courses

# Searching and Sorting - PowerPoint Presentation,Algorithm, Engineering Notes | EduRev

## : Searching and Sorting - PowerPoint Presentation,Algorithm, Engineering Notes | EduRev

``` Page 1

1
24 24
Searching and
Sorting
Page 2

1
24 24
Searching and
Sorting
2
With sobs and tears
he sorted out
Those of the largest size …
— Lewis Carroll
Attempt the end, and never stand to doubt;
Nothing’s so hard, but search will find it out.
— Robert Herrick
It is an immutable law in business that words are
words, explanations are explanations, promises
are promises — but only performance is reality.
— Harold S. Green
Page 3

1
24 24
Searching and
Sorting
2
With sobs and tears
he sorted out
Those of the largest size …
— Lewis Carroll
Attempt the end, and never stand to doubt;
Nothing’s so hard, but search will find it out.
— Robert Herrick
It is an immutable law in business that words are
words, explanations are explanations, promises
are promises — but only performance is reality.
— Harold S. Green
3
OBJECTIVES
In this chapter you will learn:
 To search for a given value in an array
using the linear search and binary search
algorithm.
 To sort arrays using the iterative selection
 To sort arrays using the iterative selection
and insertion sort algorithms.
 To sort arrays using the recursive merge
sort algorithm.
 To determine the efficiency of searching
and sorting algorithms.
Page 4

1
24 24
Searching and
Sorting
2
With sobs and tears
he sorted out
Those of the largest size …
— Lewis Carroll
Attempt the end, and never stand to doubt;
Nothing’s so hard, but search will find it out.
— Robert Herrick
It is an immutable law in business that words are
words, explanations are explanations, promises
are promises — but only performance is reality.
— Harold S. Green
3
OBJECTIVES
In this chapter you will learn:
 To search for a given value in an array
using the linear search and binary search
algorithm.
 To sort arrays using the iterative selection
 To sort arrays using the iterative selection
and insertion sort algorithms.
 To sort arrays using the recursive merge
sort algorithm.
 To determine the efficiency of searching
and sorting algorithms.
4
24.1 Introduction
24.2 Searching Algorithms
24.2.1 Linear Search
24.2.2 Binary Search
24.3 Sorting Algorithms
24.3.1 Selection Sort
24.3.2 Insertion Sort
24.3.3 Merge Sort
24.3.3 Merge Sort
24.4 Wrap-Up
Page 5

1
24 24
Searching and
Sorting
2
With sobs and tears
he sorted out
Those of the largest size …
— Lewis Carroll
Attempt the end, and never stand to doubt;
Nothing’s so hard, but search will find it out.
— Robert Herrick
It is an immutable law in business that words are
words, explanations are explanations, promises
are promises — but only performance is reality.
— Harold S. Green
3
OBJECTIVES
In this chapter you will learn:
 To search for a given value in an array
using the linear search and binary search
algorithm.
 To sort arrays using the iterative selection
 To sort arrays using the iterative selection
and insertion sort algorithms.
 To sort arrays using the recursive merge
sort algorithm.
 To determine the efficiency of searching
and sorting algorithms.
4
24.1 Introduction
24.2 Searching Algorithms
24.2.1 Linear Search
24.2.2 Binary Search
24.3 Sorting Algorithms
24.3.1 Selection Sort
24.3.2 Insertion Sort
24.3.3 Merge Sort