Chapter 4 Flashcards

1
Q

is the process of finding some particular element in the list.

A

Searching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

also called as sequential search, is a very simple method used for searching an array for a particular value.

A

Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

is defined as asearching algorithmused in a sorted array byrepeatedly dividing the search interval in half.

A

Binary Search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

follows divide and conquer approach in which, the list is divided into two halves and the item is compared with the middle element of the list.

A

Binary search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The time complexity of linear search

A

O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The time complexity of binary search

A

O(log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It is also called sequential search

A

Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

It is also called half interval search

A

Binary search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Performs equality comparison

A

Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Performs ordering comparison

A

Binary search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly