









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is an easily understandable brief description of concepts for problem solving and object oriented programming.
Typology: Slides
1 / 49
This page cannot be seen from the preview
Don't miss anything!










































Session – 31 to 32
(^) Results of VIT entrance exam has been released. Given the details of the students such as name, address and marks scored in entrance, write a program to sort the student details so that it will be convenient to call for counselling.
There are several sorting algorithms available like bubble sort, selection sort, insertion sort, quick sort, merge sort, radix sort etc. (^) Sorting operation is performed in many applications to provide the output in desired order. For example listing all the product in the increasing order of their names or decreasing order of supplier names Searching will be easier in a sorted collection of elements List containing exam scores sorted from lowest to highest or vice versa We study Bubble Sorting, Selection Sorting and Insertion Sorting in this lab course
Compares neighboring pairs of array elements, starting with the last array element, and swaps neighbors whenever they are not in correct order. On each pass, this causes the smallest element to “bubble up” to its correct place in the array.
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]
values [ 0 ] [ 1 ] [ 2 ] [ 3 ] [ 4 ]