SlideShare a Scribd company logo
Faculty of Computer Science and Engineering
              Department of Computer Science


                                     LAB SESSION 6
                                    Sorting algorithms


1. OBJECTIVE

The objective of Lab 6 is to help students to practice on sorting algorithms studied during
this course.

2. INTRODUCTION
In this study, students try to implement several sorting algorithms and then evaluate each
algorithm through a given set of dataset. Each dataset contains initially a list of data in an
arbitrary order. After calling some sorting algorithm on a dataset, the practical execution
time is stored in order to make analysis to compare the performance of all implemented
sorting algorithms.

Required Exercises

Question 1.
Implement the following sort algorithms to sort an array of integers:
      - Bubble sort
      - Selection sort
      - Insertion sort
      - Heap sort
      - Merge sort
      - Quick sort

Question 2.
Implement the Quick and Merge Sorting algorithm to sort a linked list of integers.

Advanced Exercises
Question 3.
Implement the Shell Sorting algorithm to sort an array of integers.

Question 4.
Re-implement BST and AVL tree in order to sort a list of data (as described above).

Question 5.
Implement 3-way tree and 5-way tree in order to sort a list of data (as described above).




                                                                                         1/1

More Related Content

What's hot

Introduction to Data Structure & algorithm
Introduction to Data Structure & algorithmIntroduction to Data Structure & algorithm
Introduction to Data Structure & algorithm
Sunita Bhosale
 
Using other functions
Using other functionsUsing other functions
Using other functions
Cha Mostierra
 
ES6 Template Literal & Tag Function
ES6 Template Literal & Tag FunctionES6 Template Literal & Tag Function
ES6 Template Literal & Tag Function
Jae Nam Jung
 
Document clustering and classification
Document clustering and classification Document clustering and classification
Document clustering and classification
Mahmoud Alfarra
 
Data structue q & a
Data structue q & aData structue q & a
Data structue q & a
rohanbajaj222
 
Prelim Project OOP
Prelim Project OOPPrelim Project OOP
Prelim Project OOP
Dwight Sabio
 
10.combination of sm_tn_rbmt
10.combination of sm_tn_rbmt10.combination of sm_tn_rbmt
10.combination of sm_tn_rbmt
Hiroshi Matsumoto
 
Decision Tree from Scratch in Python
Decision Tree from Scratch in PythonDecision Tree from Scratch in Python
Decision Tree from Scratch in Python
Dhirajk7
 
Competition16
Competition16Competition16
Competition16
Saurabh Vashist
 
Sorting arrays
Sorting arrays Sorting arrays
Sorting arrays
Samar Anter
 
Unsupervised Learning
Unsupervised LearningUnsupervised Learning
Unsupervised Learning
Alia Hamwi
 
Python session 10
Python session 10Python session 10
Python session 10
Navaneethan Naveen
 
Java - Class Structure
Java - Class StructureJava - Class Structure
Java - Class Structure
Victer Paul
 
ML basic & clustering
ML basic & clusteringML basic & clustering
ML basic & clustering
monalisa Das
 
Observations
ObservationsObservations
Observations
butest
 
Comp 220 i lab 6 overloaded operators lab report and source code
Comp 220 i lab 6 overloaded operators lab report and source codeComp 220 i lab 6 overloaded operators lab report and source code
Comp 220 i lab 6 overloaded operators lab report and source code
pradesigali1
 

What's hot (16)

Introduction to Data Structure & algorithm
Introduction to Data Structure & algorithmIntroduction to Data Structure & algorithm
Introduction to Data Structure & algorithm
 
Using other functions
Using other functionsUsing other functions
Using other functions
 
ES6 Template Literal & Tag Function
ES6 Template Literal & Tag FunctionES6 Template Literal & Tag Function
ES6 Template Literal & Tag Function
 
Document clustering and classification
Document clustering and classification Document clustering and classification
Document clustering and classification
 
Data structue q & a
Data structue q & aData structue q & a
Data structue q & a
 
Prelim Project OOP
Prelim Project OOPPrelim Project OOP
Prelim Project OOP
 
10.combination of sm_tn_rbmt
10.combination of sm_tn_rbmt10.combination of sm_tn_rbmt
10.combination of sm_tn_rbmt
 
Decision Tree from Scratch in Python
Decision Tree from Scratch in PythonDecision Tree from Scratch in Python
Decision Tree from Scratch in Python
 
Competition16
Competition16Competition16
Competition16
 
Sorting arrays
Sorting arrays Sorting arrays
Sorting arrays
 
Unsupervised Learning
Unsupervised LearningUnsupervised Learning
Unsupervised Learning
 
Python session 10
Python session 10Python session 10
Python session 10
 
Java - Class Structure
Java - Class StructureJava - Class Structure
Java - Class Structure
 
ML basic & clustering
ML basic & clusteringML basic & clustering
ML basic & clustering
 
Observations
ObservationsObservations
Observations
 
Comp 220 i lab 6 overloaded operators lab report and source code
Comp 220 i lab 6 overloaded operators lab report and source codeComp 220 i lab 6 overloaded operators lab report and source code
Comp 220 i lab 6 overloaded operators lab report and source code
 

Viewers also liked

Presentation1.PPTX
Presentation1.PPTXPresentation1.PPTX
Presentation1.PPTX
jameschloejames
 
Fonts!!
Fonts!!Fonts!!
Fonts!!
AlanSmith96
 
Magazine cover analysis q
Magazine cover analysis qMagazine cover analysis q
Magazine cover analysis q
charliedewsnip
 
Depliant contenant (1)
Depliant contenant (1)Depliant contenant (1)
Depliant contenant (1)
legrandbassin
 
Mapa conceptual
Mapa conceptualMapa conceptual
Mapa conceptual
Bibiana Bermúdez
 
Feliz
FelizFeliz

Viewers also liked (8)

Presentation1.PPTX
Presentation1.PPTXPresentation1.PPTX
Presentation1.PPTX
 
Ic
IcIc
Ic
 
Fonts!!
Fonts!!Fonts!!
Fonts!!
 
Magazine cover analysis q
Magazine cover analysis qMagazine cover analysis q
Magazine cover analysis q
 
Depliant contenant (1)
Depliant contenant (1)Depliant contenant (1)
Depliant contenant (1)
 
14~19 10 m&e schedule -1
14~19 10 m&e schedule -114~19 10 m&e schedule -1
14~19 10 m&e schedule -1
 
Mapa conceptual
Mapa conceptualMapa conceptual
Mapa conceptual
 
Feliz
FelizFeliz
Feliz
 

Similar to Lab6

Ppt chapter11
Ppt chapter11Ppt chapter11
Ppt chapter11
Richard Styner
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)
Mehedi Hasan
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
Sony India Software Center
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
Jon Lederman
 
Machine learning and decision trees
Machine learning and decision treesMachine learning and decision trees
Machine learning and decision trees
Padma Metta
 
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
MahmoudAbuGhali
 
Java Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptxJava Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptx
rangariprajwal4554
 
Improving Classifier Accuracy using Unlabeled Data..doc
Improving Classifier Accuracy using Unlabeled Data..docImproving Classifier Accuracy using Unlabeled Data..doc
Improving Classifier Accuracy using Unlabeled Data..doc
butest
 
StackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkStackNet Meta-Modelling framework
StackNet Meta-Modelling framework
Sri Ambati
 
ANN - UNIT 3.pptx
ANN - UNIT 3.pptxANN - UNIT 3.pptx
ANN - UNIT 3.pptx
ANN - UNIT 3.pptxANN - UNIT 3.pptx
Introduction data structure
Introduction data structureIntroduction data structure
Introduction data structure
Muhammad Ismail
 
Spike sorting-tutorial
Spike sorting-tutorialSpike sorting-tutorial
Spike sorting-tutorial
vacagodx
 
Method overloading
Method overloadingMethod overloading
Method overloading
Lovely Professional University
 
Method overloading
Method overloadingMethod overloading
Method overloading
Lovely Professional University
 
Sorting
SortingSorting
Beta gal lab writeup
Beta gal lab writeupBeta gal lab writeup
Beta gal lab writeup
ilanasaxe
 
Dl36675677
Dl36675677Dl36675677
Dl36675677
IJERA Editor
 
Java Unit 2(part 3)
Java Unit 2(part 3)Java Unit 2(part 3)
Java Unit 2(part 3)
SURBHI SAROHA
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.ppt
classall
 

Similar to Lab6 (20)

Ppt chapter11
Ppt chapter11Ppt chapter11
Ppt chapter11
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 
Machine learning and decision trees
Machine learning and decision treesMachine learning and decision trees
Machine learning and decision trees
 
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
17_00-Dima-Panchenko-cnn-tips-and-tricks.pptx
 
Java Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptxJava Programming Comprehensive Guide.pptx
Java Programming Comprehensive Guide.pptx
 
Improving Classifier Accuracy using Unlabeled Data..doc
Improving Classifier Accuracy using Unlabeled Data..docImproving Classifier Accuracy using Unlabeled Data..doc
Improving Classifier Accuracy using Unlabeled Data..doc
 
StackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkStackNet Meta-Modelling framework
StackNet Meta-Modelling framework
 
ANN - UNIT 3.pptx
ANN - UNIT 3.pptxANN - UNIT 3.pptx
ANN - UNIT 3.pptx
 
ANN - UNIT 3.pptx
ANN - UNIT 3.pptxANN - UNIT 3.pptx
ANN - UNIT 3.pptx
 
Introduction data structure
Introduction data structureIntroduction data structure
Introduction data structure
 
Spike sorting-tutorial
Spike sorting-tutorialSpike sorting-tutorial
Spike sorting-tutorial
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Sorting
SortingSorting
Sorting
 
Beta gal lab writeup
Beta gal lab writeupBeta gal lab writeup
Beta gal lab writeup
 
Dl36675677
Dl36675677Dl36675677
Dl36675677
 
Java Unit 2(part 3)
Java Unit 2(part 3)Java Unit 2(part 3)
Java Unit 2(part 3)
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.ppt
 

Recently uploaded

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 

Recently uploaded (20)

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 

Lab6

  • 1. Faculty of Computer Science and Engineering Department of Computer Science LAB SESSION 6 Sorting algorithms 1. OBJECTIVE The objective of Lab 6 is to help students to practice on sorting algorithms studied during this course. 2. INTRODUCTION In this study, students try to implement several sorting algorithms and then evaluate each algorithm through a given set of dataset. Each dataset contains initially a list of data in an arbitrary order. After calling some sorting algorithm on a dataset, the practical execution time is stored in order to make analysis to compare the performance of all implemented sorting algorithms. Required Exercises Question 1. Implement the following sort algorithms to sort an array of integers: - Bubble sort - Selection sort - Insertion sort - Heap sort - Merge sort - Quick sort Question 2. Implement the Quick and Merge Sorting algorithm to sort a linked list of integers. Advanced Exercises Question 3. Implement the Shell Sorting algorithm to sort an array of integers. Question 4. Re-implement BST and AVL tree in order to sort a list of data (as described above). Question 5. Implement 3-way tree and 5-way tree in order to sort a list of data (as described above). 1/1