CS 250: Data Structures and Algorithms
CS 250: Data Structures and Algorithms
Class: BEE-9CD
CLO4: Investigate and evaluate various algorithms based on accuracy, time complexity, and
memory requirements.
In this lab, you will implement three sorting algorithms and compare them.
Objectives
Objective of this lab is to implement insertion sort and merge sort and compare the running times
for both sorting algorithms.
Tools/Software Requirement
Description
Bubble Sort:
Insertion sort is a popular sorting algorithm, which is quite simple to implement. The pseudo code
is as follows:
Selection Sort:
Selection sort is a popular sorting algorithm, which is quite simple to implement. The pseudo code
is as follows:
Insertion Sort:
Lab Tasks
Task 1:
Implement Bubble sort, Selection sort and Insertion sort algorithms in C++.
Deliverables
Note: Use proper indentation and comments. Lack of comments and indentation will result in
deduction of marks. You will submit your working codes in word document (do NOT take
screenshot of code, just copy your code and paste it). The name of word document should follow
this format. i.e. YOUR_NAME_Lab#