14 lines
570 B
Org Mode
14 lines
570 B
Org Mode
* Lab Work - Sorting and Binary Search
|
|
Get an array of integer, the target integer, then sort the array and find the target using binary
|
|
search
|
|
- Create a library for binary search and a sorting algorithm to sort the array and use it in main
|
|
file
|
|
- Input:
|
|
- First line contains one integer $n$, the size of the array
|
|
- Second line contains $n$ integers $a_i$, elements of the array
|
|
- Third line contains the search integer/key $m$
|
|
- Output:
|
|
- Print the location of the search integer $m$ in the given array. If not found, print =-1=.
|
|
Submit the zipped folder
|
|
|