Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

A Project Report Sorting Visualizer

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

SORTING VISUALIZER

A PROJECT REPORT
ON
SORTING VISUALIZER

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE


AWARD OF THE DEGREE OF
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING

SUBMITTED BY

NAME UNIVERSITY ROLL NO.


KHUSHDEEP 18010102008

RIMT UNIVERSITY, MANDI GOBINDGARH


PUNJAB

November 2021
SORTING VISUALIZER
A PROJECT REPORT
ON
SORTING VIZUALIZER

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE


AWARD OF THE DEGREE OF
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING

SUBMITTED BY

NAME UNIVERSITY ROLL NO.


KHUSHDEEP 18010102008

RIMT UNIVERSITY, MANDIGOBINDGARH


PUNJAB

November 2021
CANDIDATE’S DECLARATION

I hereby certify that the project entitled “SORTING VISUALIZER”


submitted by KHUSHDEEP & 18010102008 in partial fulfillment of the
requirement for the award of degree of the B. Tech. (Computer Science &
Engineering) submitted in Department of Computer Science & Engineering,
at RIMT University, MandiGobindgarh is an authentic record of my own
work carried out during a period from July 2021 to Nov. 2021. The matter
presented in this project has not formed the basis for the award of any other
degree, diploma, fellowship or any other similar titles.

KHUSHDEEP
RIMT UNIVERSITY
26/11/2021
CERTIFICATE

This is to certify that the project titled “SORTING VISUALIZER” is the bona fide
work carried out by KHUSHDEEP & 18010102008 in partial fulfillment of the
requirement for the award of degree of the B. Tech. (Computer Science &
Engineering) submitted in Department of Computer Science & Engineering, at
RIMT University, MandiGobindgarh is an authentic record of my own work
carried out during a period from 12/09/2021 to 24/11/2021. The Major Project
Viva-Voce Examination has been held on 26/11/2021.

Signature of the HoD

Department of CSE.
LIST OF FIGURES
ACKNOWLEDGEMENT

It is great pleasure to present this report on the project named


"SORTING VISUALIZER" undertaken by me as part of my B.
Tech (CSE) curriculum.
I am thankful to RIMT UNIVERSITY for offering me such a
wonderful challenging opportunity and I express my deepest
thanks to all coordinators, of RIMT UNIVERSITY for providing
all the possible help and assistance and their constant
encouragement.

It is a pleasure that I find ourselves penning down these lines to


express our sincere thanks to the people who helped us along the
way in completing our project. I find inadequate words to express
our sincere gratitude towards them.
ABSTRACT

To make the student easier to study how the operations on data structure
and various algorithms are performed. The data structures can be stack,
queue and linked list etc and algorithms are sorting like bubble sort,
insertion sort etc.

Aim behind implementation of this project to make a clear


understandability of various algorithms of data structures. Using a web
page this will simulates the data structure operations such as searching,
sorting, insertion, deletion etc. In array, stack, queue, and linked list as
well. Thus, our web page provides effective and efficient knowledge of
data structures. This also provide some theoretical knowledge regarding
the data structure.

Programming language
1.HTML
2.JAVA
CHAPTER 1
1. INTRODUCTION

1.1 Problem Definition

Aim behind implementation of this project to make a clear understandability of various


algorithms of data structures. Using a web page this will simulates the data structure
operations such as searching, sorting, insertion, deletion etc. In array, stack, queue, and
linked list as well. Thus our web page provides effective and efficient knowledge of data
structures. This also provide some theoretical knowledge regarding the data structure.

1.2 Objectives
To study how the operations on data structure and algorithms are performed. And how
the values are compared in a sorting algorithms and swapped. Total Number of
comparison and exchanges performed in a sorting algorithm. And the corresponding code
performed while sorting. .To get a clear idea about various data structures and operations
on it. And how can we implement a data structure.

1.3 Data Structure:


In computer science, a data structure is a particular way of storing and organizing data in
a computer so that it can be used efficiently. Different kinds of data structures are suited
to different kinds of applications, and some are highly specialized to specific tasks. For
example, B-trees are particularly well-suited for implementation of databases, while
compiler implementations usually use hash tables to look up identifiers. Data structures
provide a means to manage large amounts of data efficiently, such as large databases and
internet indexing services. Usually, efficient data structures are a key to designing
efficient algorithms. Some formal design methods and programming languages
emphasize data structures, rather than algorithms, as the key organizing factor in software
design. Storing and retrieving can be carried out on data stored in both main memory and
in.

1.3.1 ARRAY:
An array is a collection of items stored at contiguous memory locations. The idea is to
store multiple items of the same type together. This makes it easier to calculate the
position of each element by simply adding an offset to a base value, i.e., the memory
location of the first element of the array (generally denoted by the name of the array).
The base value is index 0 and the difference between the two indexes is the offset.
1.4 Algorithms

1.4.1 Bubble Sort:


Bubble sort, sometimes incorrectly referred to as sinking sort, is a simple sorting
algorithm that works by repeatedly stepping through the list to be sorted, comparing each
pair of adjacent items and swapping them if they are in the wrong order. The pass
through the list is repeated until no swaps are needed, which indicates that the list is
sorted. The algorithm gets its name from the way smaller elements "bubble" to the top of
the list. Because it only uses comparisons to operate on elements, it is a comparison sort.
Although the algorithm is simple, most of the other sorting algorithms are more efficient
for large lists.

1.4.2 Selection Sort:


selection sort is a sorting algorithm, specifically an in-place comparison sort. It has
O(n2) time complexity, making it inefficient on large lists, and generally performs worse
than the similar insertion sort. Selection sort is noted for its simplicity, and it has
performance advantages over more complicated algorithms in certain situations,
particularly where auxiliary memory is limited. The algorithm divides the input list into
two parts: the sublist of items already sorted, which is built up from left to right at the
front (left) of the list, and the sublist of items remaining to be sorted that occupy the rest
of the list. Initially, the sorted sublist is empty and the unsorted sublist is the entire input
list. The algorithm proceeds by finding the smallest (or largest, depending on sorting
order) element in the unsorted sublist, exchanging it with the leftmost unsorted element
(putting it in sorted order), and moving the sublist boundaries one element to the right.

1.4.3 Insertion sort:


Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one
item at a time. It is much less efficient on large lists than more advanced algorithms such
as quicksort, heapsort, or merge sort. However, insertion sort provides several
advantages:
Efficient for (quite) small data sets
Adaptive (i.e., efficient) for data sets that are already substantially sorted: the time
complexity is O(n + d), where d is the number of inversions
More efficient in practice than most other simple quadratic (i.e., O(n2)) algorithms such
as selection sort or bubble sort; the best case (nearly sorted input) is O(n) Stable; i.e.,
does not change the relative order of elements with equal keys In-place; i.e., only requires
a constant amount O(1) of additional memory space Online; i.e., can sort a list as it
receives it When humans manually sort something (for example, a deck of playing cards),
most use a method that is similar to insertion sort.

1.4.4 Quick sort:


Quicksort, or partition-exchange sort, is a sorting algorithm developed by Tony Hoare
that, on average, makes O(n log n) comparisons to sort n items. In the worst case, it
makes O(n2) comparisons, though this behavior is rare. Quicksort is often faster in
practice than other O(n log n) algorithms.Additionally, quicksort's sequential and
localized memory references work well with a cache. Quicksort is a comparison sort and,
in efficient implementations, is not a stable sort. Quicksort can be implemented with an
in-place partitioning algorithm, so the entire sort can be done with only O(log n)
additional space used by the stack during the recursion.

You might also like