ASSIGMENT NO.
-1(Searching/Sorting)
1. Implement binary search using C-programming language.
2. There is a sorted set of numbers given 33,44,55,57,62,64,67,71,73,74,76,78,79,89,99.
Write down a binary search program in C- programming language to find out the
position of “78”.
3. Given a set of numbers. Find an element in the array using linear search. Implement
using python language.(gedit filename.py)
4. Given the unsorted list [6, 5, 4, 3, 7, 1, 2], show what the contents of the list would be
after each iteration of the loop as it is sorted using the following: a) Selection sort b)
Insertion sort(using C)
5. Implement Bubble sort using Python language.
6. Implement heap sort using Python language.
7. Implement Insertion sort using Python language.
8. Take input of the following elements – 10,20,30,35,40,45,50,55,60,66,77,88,89. Find
66 using proper sorting approach in python.
9. Write a C program to implement quick sort.
10. Implement Selection sort using Python language.
11. Implement Merge sort using Python language.
12. Given the unsorted list [61, 25,14, 3,17,21, 29], show what the contents of the list
would be after each iteration of the loop as it is sorted using the following: a) Bubble
sort b) Insertion sort (Use C)
13. Create a structure/class for a group of 50 students holding data for their Regn
no., Name, Branch, CGPA.
a) Call linear search function to display data of student with a particularRegn
no..
b) Call bubble sort function to arrange data of students according to Regn no.
c) Apply binary search on the above output (part b) to display data of a student
with a particular Regn no.
d) Use and modify Insertion sort logic to arrange data of students in descending
order of CGPA.