Sorting Techniques in Data Structures: in Partial Fulfilment of The Requirements For The Award of The

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Sorting Techniques In Data

Structures
Summer Internship Report

Submitted to:

Sharda University

in partial fulfilment of the requirements for the award of the

Degree of Bachelor of Technology

in

Computer Science and Engineering

By

Raghav Gupta
2018004539

Under the mentorship of


Mr.Tejasvi Khanna
(Associate Professor)

Department of Computer Science and Engineering


School of Engineering and Technology
Sharda University
Greater Noida
November 2021
DECLARATION

I hereby declare that the project entitled “Sorting Techniques in data structures” submitted for
the course of Summer Internship Project, is my original work. I have adequately cited and
referenced the original sources. I also declare that I have adhered to all principles of academic
honesty and integrity and have not misrepresented or fabricated or falsified any
idea/data/fact/source in my submission. I understand that any violation of the above will be
cause for disciplinary action by the University and can also evoke penal action from the
sources which have thus not been properly cited or from whom proper permission has not
been taken when needed.

Signature of the Student


Place: Sharda University
Date: 23 November 2021

ii
CERTIFICATE

It is certified that the work contained in the project report titled “Sorting Techniques in data
structures” by “Raghav Gupta” has been carried out under my supervision and that this work
has not been submitted elsewhere.

Signature of the Mentor


Place: Sharda University
Date: 23 November 2021

iii
ACKNOWLEDGEMENT

A great gratitude to Sharda University, School of Engineering and Technology and,


Department of Computer Science for providing me the opportunity to attend this kind of
summer training session and learn valuable skills.
I convey my special thanks to my supervisor during this project Mr. Tejaswi Khanna,
assistant professor, Sharda University for helping with improving my skills and upgrading
me up with these basics which could help me in completing my internship report on code
titled as “Sorting Techniques in data structures”. Without the help of him this report could
not get this much successand I could not get this much knowledge about it.

Place: Sharda University


Date: 23 November 2021

iv
TABLE OF CONTENTS

Title Page i

Declaration of the Student ii

Certificate of the Guide iii

1. INTRODUCTION 1

2. LEARNING OUTCOMES 2
2.1 Related Work 2

2.2 Innovative code learn/developed during Internship 3

2.3 Application Developed 4

3. References 5

v
CHAPTER 1

INTRODUCTION

The code that I’ve done and will be showing here, is implemented during my summer
internship program. As we know that sorting in any language is essential for performing
several operations and arranging the values in ascending or descending order. The program
will be used for making comparisons in between different sorting algorithms and thus, will be
efficient as will allow us to know the best sorting algorithm for each input case.
Here, I’ve taken different sorting algorithms which all
perform the same function by different methods thus performs different number of
comparisons.

Bubble Sort: In bubble sort iterations are done and adjacent elements are swapped based
upon their respective positions in the correct order of the elements. the iterations are repeated
as much number of times the elements.
Quick Sort: In quicksort a pivot element is selected and the other elements are placed
to their correct position based on the position of the pivot element iterations are repeated
by selecting pivot element differently.
Selection Sort: In selection sort every time the minimum element is searched from the
array and it is placed in the beginning of the array. this step is repeated for every element.
Insertion Sort: In insertion sort two sub arrays are created named as sorted subarray and
unsorted subarray.
Elements from the unsorted subarray are placed in their correct position in the sorted
subarray and it is repeated until the unsorted subarray merges into the sorted subarray
Merge Sort: Merge sort follows the principle of divide and conquer that it divides the array
repeatedly into subarrays of one or two element then arranging them according to the correct
order of elements and merging the subarrays into a single array.
Counting Sort: Counting sort works only when the range of element is given and taking an
auxiliary array and counting the number of elements before the respective element in the array
is sorted.
Radix Sort: Radix sort works when the base of the elements is given and arranging the
elements according to their digits in the correct order the array is sorted

1
CHAPTER 2

1. LEARNING OUTCOMES

[1] RELATED WORK:

There are various research papers written for comparative study of sorting algorithms. Like a
similar work is available on research gate website as a research paper from faculty of
University of waterloo. The aim is to suggest the best and efficient sorting algorithm. They
have used median, heap, and quick sort techniques for determining performance. The
implementation was also been done in C language. By this way they can adopt good sorting
technique for grid computing.
The link for the paper on research gate for reference is: -
https://www.researchgate.net/publication/288825600_A_Comparative_Study_of_Sorting_Al
gorithms#:~:text=Abstract,the%20most%20efficient%20sorting%20algorithm.&text=The%2
0number%20of%20sorting%20algorithms,%2C%20insertion%2C%20and%20selection%20s
orting.

The above given tables show the achieved outcome of the proposed work of the paper.
There are various other works as well like Sorting Algorithms – A Comparative Study
(https://www.researchgate.net/publication/315662067_Sorting_Algorithms_-
_A_Comparative_Study ).

2
CHAPTER 2

LEARNING OUTCOMES

[2] INNOVATIVE CODE LEARN/ DEVELOPED:

There are various sorting algorithms which does the same thing of re-arrangement of list
items in ascending or descending order. Thus, the code helps us to determine which sorting
algorithm is better among them all in no. of comp. they do they do. The larger number of
comparisons will lead to a greater number of execution of loops and hence greaterthe time
taken.

1
CHAPTER 2

LEARNING OUTCOMES

[3] APPLICATION DEVELOPED:


Application or the program provides the user a menu screen with all the sorting types
available for comparison and after choosing the compare all option the user is provided
with the instruction to input the and on the basis of which comparisonsis to be made.
Thus, after entering the list input the sorted list of array appears with all the sorting
techniques listed down below and in front of them, the number of comparisons is also
calculated. So, on the basis of those number of comparisons the sorting technique with
least performing calculation could be obtained and thus could be used in the further
programs for minimizing the code complexity and enhancing its optimality.

The main application of these sorting algorithms is not stand alone but rather these are used
in different other problems for making them easily solvable.

2
2. REFERENCES

S.No Reference Link


. Name
[1] GeeksForGeek https://www.geeksforgeeks.org/sorting-algorithms/
s
[2]
Tutorialspoint https://www.tutorialspoint.com/data_structures_algorithms/index
.htm

[3] Data https://www.cet.edu.in/noticefiles/280_DS%20Complete.pdf


Structures
Using C
[4] Javatpoint https://www.javatpoint.com/data-structure-tutorial

[5] GDB online https://www.onlinegdb.com/


compiler for C
[6] Let us C -By Yashavant P Kanetkar (Paperback)

You might also like