Coin Changing, Binary Search , Linear Search. These three type of algorithm topic has been described in the slide. Hope this will help you understand these three topic.
9. Binary Search (Ascending / Descending)
Algorithm
For Descending
3. If ITEM<DATA[MID]
Set BEG:=MID+1.
Else
Set END:=MID-1
BINARY(DATA,LB,UB,ITEM,LOC)
1. Set BEG:=LB, END:=UB and
MID:=INT((BEG+END)/2).
2. Repeat Steps 3 and 4 while BEG<=END
and DATA[MID]!=ITEM.
3. If ITEM<DATA[MID]
Set END:=MID-1
Else
Set BEG = MID+1
4. Set MID = INT((BEG+END)/2)
5. If DATA[MID] = ITEM, then
Set LOC = MID
Else
Set LOC = NULL
6. Exit.
11. Binary Search (Ascending)
Output of Output of Binary Ascending part
In Case the searched value
is present in the data
In Case the searched value
is not present in the data
13. Binary Search (Descending)
Output of Binary Descending part
In Case the searched value
is present in the data
In Case the searched value
is not present in the data
14. Linear Search
Algorithm
1. Set DATA[N+1] = ITEM
2. Set LOC = 0
3. Repeat while DATA[LOC] != ITEM
Set LOC = LOC+1
4. If LOC=N+1, then: Set LOC = 0
5. Exit