0% found this document useful (0 votes)
100 views1 page

C and Python Search/Sort Implementations

The document outlines 13 programming assignments related to searching and sorting algorithms: 1. Implement binary search in C to find the position of 78 in a sorted array of numbers. 2. Implement linear search in Python to find an element in an unsorted array. 3. Create a structure for student data and use linear search, bubble sort, binary search, and insertion sort to arrange and find data based on registration number and GPA.

Uploaded by

NEEPA BISWAS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views1 page

C and Python Search/Sort Implementations

The document outlines 13 programming assignments related to searching and sorting algorithms: 1. Implement binary search in C to find the position of 78 in a sorted array of numbers. 2. Implement linear search in Python to find an element in an unsorted array. 3. Create a structure for student data and use linear search, bubble sort, binary search, and insertion sort to arrange and find data based on registration number and GPA.

Uploaded by

NEEPA BISWAS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.

You might also like