Skip to content

NazirAhmad123/final-projects

 
 

Repository files navigation

Team Name: Sz

Project Name: QuickSort Visualization

Section: 3

Members:

  1. Name: Mohammad Nazir Noori (1327335)

  2. Name: Jawid Arabzada (1328317)

  3. Name: Ibrahim Aini (1218419)

  4. Name: Mozhda barekzai (1217092)

  5. Name: Faizanullah Faizi (1214703)


Report

We have developed a program to visualize the quick sort through Java programming language and in this project we have added an extra sorting which is selection sort as an extra feature of the program.

We have used a class called sorter where we do all the work such as a method name swap to sawp the numbers whenever it is called and a method named reload to mix the numbers every time we run the program followed by the sorting algorithms (Quick Sort and Selection Sort).

Quick sort algorithm : in algorithm that we have used we choose the left most item as the pivot and after that we make the partition to left and right . then we compare the value of both side left and right if the value of right is greater than value of left we move to another item in right side , and if left is lesser than right and value of left lesser or equal to pivot we move to the right side by one . then if left is lesser than right we do swap the values . and we call quicksort again to to do the same process recursively .

And all the code for UI is in the main where we used the paintComponent method to create a line for each number whenever the start click it clicked. I have provided the comments for start and stop buttons and all the methods we use such as runAnimation() and PAUSE() and ect.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published