You are on page 1of 12

Academic Year: 2020 -2021

REPORT ON MICRO-
PROJECT

Sorting Linked list using Bubble Sort

PROGRAM CODE : CO3I-B


COURSE NAME : DATA STRUCTURE USING C
COURSE CODE : DSU (22317)

Submitted by:
Aditya Tahiliani

Submitted to:
Mrs. Alka Prayagkar
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION

Certificate

This is to certify that Mr. / Ms. TAHILIANI ADITYA PARMANAND .

Roll No. 22 of THIRD Semester Diploma in COMPUTER ENGINEERING of

Vivekananda Education Society’s Polytechnic (Code No. 0004) has completed the

Micro-Project work satisfactory in DATA STRUCTURE USING C (22317) for the

academic year 2020 - 2021 as prescribed in the MSBTE curriculum.

Place: Chembur, Mumbai. Enrollment No. 1900040161 .

Date: _________________. Exam Seat No.: .

Subject Teacher Head of the Department Principal

Seal of

Institution
Annexure – I
Micro-Project Proposal
Sorting Linked list using Bubble Sort

1.0 Aim/Benefits of the Micro-Project:


1) Develop an algorithm on the given problem i.e. Sorting the Linked list using Bubble Sort.
2) Learn instructions for program development of Sorting Linked List.
3) Prepare the Flowchart and Program for the same.
.
2.0 Course Outcomes Addressed:
CO1: Perform basic operations on arrays.
CO2: Apply different Searching and Sorting techniques.
CO4: Implement basic operations on Linked List.
3.0 Proposed Methodology:
In order to make a best micro-project, we decided to divide our tasks and proposed a short
methodology for our project. It is as follows:
a) To have a brain-storming session after the allotment of the topic for Micro-Project.
b) To prepare a proposed plan about the Micro-Project and inform about it to the subject teacher.
c) To manage the required resources like computer, printer, suitable software, etc. for the micro
project.
d) To divide the work responsibilities like collecting data, editing,coding and implementation, etc.
among the group members.
e) To discuss about the aim, outcomes, applications, outputs, etc. of the project in detail.
f)Finally, to prepare a Program on the assigned topic and show the output to the teacher.
g) To make the required changes in the Program as guided by the respective teacher.
h) Also prepare the algorithm and flowchart for our program.
i) Finally, to submit the program code, output as well as the project report before the deadline to the
respective subject teacher.
4.0 Action Plan:

Details
Sr. Planned Planned Name of Team
of
No. Start date Finish date Members
Activity
1. Discussion and finalization of topic 02/12/2020 10/12/2020 All members
2. Preparation and submission of Abstract 10/12/2020 17/12/2020 All members
3. Design procedure (Algorithm/Flowchart) 17/12/2020 24/12/2020 All members
4. Coding 24/12/2020 31/12/2020 All members
5. Coding 31/12/2020 07/01/2021 All members
6. Editing and Testing of Program 07/01/2021 14/01/2021 All members
7. Compilation of Report 14/01/2021 21/01/2021 All members
Actual Presentation & Final submission of Micro
8. 21/01/2021 28/01/2021 All members
Project
5.0 Resources Required:

Sr.
Name of Resource/material Specifications Quantity Remarks
No.
i3 9th gen, 8 GB RAM,3.60
1. Hardware computer system 1 -------------
GHz, 1 TB HDD
2. Operating system Windows 10 pro 1 -------------

3. Software Turbo C3 1 -------------

Names of Team Members with Roll No.s:

Sr. Roll.
Name of Team Members Enrollment No. Seat No.
No. No.
1. 21 Divyaa Thaivalappil 1900040160
2. 22 Aditya Tahiliani 1900040161
3. 23 Rohan Jena 1900040162
4. 24 Taniya Rohra 1900040163

Teacher Signature
(Mrs. Alka Prayagkar)

*************
Annexure – II
Micro-Project Report
Sorting Linked list using Bubble Sort

1.0 Rationale :
The bubble sort algorithm is normally implemented with data in an array. It starts at the end of the
data and swaps adjacent items if the later item is smaller than the earlier item. It then moves one
item up in the data and repeats the operation. So the smaller items “bubble up” towards the front of
the data while the larger items fall towards the bottom of the data. The algorithm is finished when it
can pass through the data from end to first without swapping any values.

2.0 Aims/Benefits of the Micro-Project:


1) Develop an algorithm on the given problem i.e. Sorting the Linked list using Bubble Sort.
2) Learn instructions for program development of Sorting Linked List.
3) Prepare the Flowchart and Program for the same.
3.0 Course Outcomes Addressed:
CO1: Perform basic operations on arrays.
CO2: Apply different Searching and Sorting techniques.
CO4: Implement basic operations on Linked List.
4.0 Literature Review:

Step-by-step example
Take an array of numbers " 5 1 4 2 8", and sort the array from lowest number to greatest number
using bubble sort. In each step, elements written in bold are being compared. Three passes will be
required;
First Pass
( 5 1 4 2 8 ) → ( 1 5 4 2 8 ), Here, algorithm compares the first two elements, and swaps since 5 > 1.
( 1 5 4 2 8 ) → ( 1 4 5 2 8 ), Swap since 5 > 4
( 1 4 5 2 8 ) → ( 1 4 2 5 8 ), Swap since 5 > 2
( 1 4 2 5 8 ) → ( 1 4 2 5 8 ), Now, since these elements are already in order (8 > 5), algorithm does
not swap them.
Second Pass
(14258)→(14258)
( 1 4 2 5 8 ) → ( 1 2 4 5 8 ), Swap since 4 > 2
(12458)→(12458)
(12458)→(12458)
Now, the array is already sorted, but the algorithm does not know if it is completed. The algorithm
needs one whole pass without any swap to know it is sorted.
Third Pass
(12458)→(12458)
(12458)→(12458)
(12458)→(12458)
(12458)→(12458)
Performance:
Bubble sort has a worst-case and average complexity of О(n2), where n is the number of items
being sorted. Most practical sorting algorithms have substantially better worst-case or average
complexity, often O(n log n). Even other О(n2) sorting algorithms, such as insertion sort, generally
run faster than bubble sort, and are no more complex. Therefore, bubble sort is not a practical
sorting algorithm.

5.0 Actual Methodology Followed:


According to the proposed methodology, we followed each and every step to make a good and
relevant Micro-Project.First of all, as discussed,we made a proposed plan, then managed the
required resources, also divided the work responsibilities. Finally our code was ready after making
enough changes. Then the responsibility of designing the basic structure of our program i.e.
Algorithm was fulfilled followed by Flow-Chart. And alas,the Program code along with Output and
Report file was handed in.
The following next pages displays the Algorithm, Flowchart, Program Code and Output for
simulation of rotating fan using computer graphics in C language:

ALGORITHM:

Step 1: start

Step 2: create structure for node


Step 2.1:Declare variables

Step 3: create function to swap the nodes


Step 3.1:struct node * swap (struct node* ptr 1,struct node * ptr2)
Step 3.2:Swap the variables using pointers

Step 4: Use another function to sort the list using bubble sort

Step 5: Use function void printlist to display the list

Step 6: void main


Step 6.1:Create a link list from array
Step 6.2: Print a list before sorting
Step 6.3:call the bubble sort function to sort the array
Step 6.4:Display the Sorted list

Step 7: stop
FLOWCHART:
Start

Create structure for node

Declare variables

Create function to swap the node

Struct node
*swap(struct*ptr1,struct*ptr2)

Swap the variables using pointer

Use another function to sort the list


using bubble sort

Use function void printlist to display


the list

Void main

Create a link list from array

Print a list before


sorting

Call the bubble sort function to sort the list

Display the sorted list

Stop
PROGRAM CODE:

#include <stdio.h>
#include <stdlib.h>

struct Node {
int data;
struct Node* next;
} Node;

struct Node* swap(struct Node* ptr1, struct Node* ptr2)


{
struct Node* tmp = ptr2->next;
ptr2->next = ptr1;
ptr1->next = tmp;
return ptr2;
}

int bubbleSort(struct Node** head, int count)


{
struct Node** h;
int i, j, swapped;

for (i = 0; i <= count; i++) {

h = head;
swapped = 0;

for (j = 0; j < count - i - 1; j++) {

struct Node* p1 = *h;


struct Node* p2 = p1->next;

if (p1->data > p2->data)


{
*h = swap(p1, p2);
swapped = 1;
}

h = &(*h)->next;
}

if (swapped == 0)
break;
}
}
void printList(struct Node* n)
{
while (n != NULL) {
printf("%d -> ", n->data);
n = n->next;
}
printf("\n");
}

void insertAtTheBegin(struct Node** start_ref, int data)


{
struct Node* ptr1
= (struct Node*)malloc(sizeof(struct Node));

ptr1->data = data;
ptr1->next = *start_ref;
*start_ref = ptr1;
}

void main()
{
int arr[] = { 78, 20, 10, 32, 1, 5 };
int list_size, i;

struct Node* start = NULL;


list_size = sizeof(arr) / sizeof(arr[0]);

for (i = 0; i < list_size; i++)


insertAtTheBegin(&start, arr[i]);
clrscr();

printf("Linked list before sorting\n");


printList(start);

bubbleSort(&start, list_size);

printf("Linked list after sorting\n");


printList(start);

getch();
}

6.0 Actual Resources Used:

Sr.
Name of Resource/material Specifications Quantity Remarks
No.
i3 9th gen, 8 GB RAM,3.60
1. Hardware computer system 1 -------------
GHz, 1 TB HDD
2. Operating system Windows 10 pro 1 -------------

3. Software Turbo C3 1 -------------


7.0 Outputs of the Micro-Project:

8.0 Skill Developed / Learning outcomes:

The following skills were developed while performing and developing this micro-project-
1. Analyzing : To analyse the problems in Interpretation of data
2. Problem solving approach: Develop good problem-solving habits.
3. Planning: Learned to work in a team along with timely completion of micro project.
4. Design skill: Designing of micro project with minimum required resources and at low cost.
5. Technical writing: Preparing a report of the proposed plan.

9.0 Applications of the Micro-Project:

A Data Structure is a particular way of organizing data in a computer so that it can be used
effectively. Thus, Sorting plays an important role in Data Structure. Efficient sorting is important for
optimizing the efficiency of other algorithms (such as search and merge algorithms) that require
input data to be in sorted lists. Sorting is also often useful for producing human-readable output.
Types of Sorting Algorithms are Quick Sort, Bubble Sort., Merge Sort., Insertion Sort, Selection Sort,
Radix Sort,etc.
A Linked List is a sequence of data structures, which are connected together via links. Linked List is
a sequence of links which contains items. Each link contains a connection to another link. Linked
list is the second most-used data structure after array.
Thus, Linked List and Sorting it using Bubble Sort is widely used in Data Structure; Following are its
applications:
1. Bubble sort is a sorting algorithm that is used to sort the elements in an ascending order.
2. It uses less storage space
3. Bubble sort can be beneficial to sort the unsorted elements in a specific order.
4. In order to create a stack ,it is used to pile up the elements on the basis of their weight
5. For Example, it can be used to sort the students on basis of their height in a line.

Teacher’s Signature
(Mrs. Alka Prayagkar)

*************
Annexure – III

Suggested Rubric for Assessment of Micro-Project

(The marks may be allowed to the characteristics of the Micro Project by considering the suggested rubrics)

Sr. Characteristic to Poor Average Good Excellent


No. be assessed ( Marks 1 - 3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )

Relevance to the Related to very few Addressed at-least one Addressed more than
1 Related to some LOs
course LOs CO one CO

Not more than two


Literature Review
sources (primary and At-least 5 relevant At –least 7 relevant About 10 relevant
2 /Information
secondary), very old sources, at least 2 latest sources, most latest sources, most latest
collection
reference

Completion of the
Completed less than Completed more than
3 Target as per Completed 50 to 60% Completed 60 to 80%
50% 80 %
project proposal

Enough data collected


Sufficient and Sufficient and
by sufficient and
Sample Size small, data appropriate sample, appropriate sample,
appropriate sample
Analysis of Data neither organized nor enough data generated enough data generated
size. Proper inferences
4 and presented well but not organized and which is organized and
by organizing and
representation not presented well. No presented well but
presenting data through
or poor inferences are poor inferences are
tables, charts and
drawn drawn
graphs.

Well
Just Well
assembled/fabricated
assembled/fabricated assembled/fabricated
with proper
and parts are not with proper functioning
Quality of functioning parts. In
functioning well. Not parts. In proper shape,
Prototype/Model Incomplete proper shape, within
5 in proper shape, within tolerance
fabrication/assembly. tolerance dimensions
dimensions beyond dimensions and good
and good
tolerance limit. finish/appearance.
finish/appearance. But
Appearance/ finish is Creativity in design
no creativity in design
shabby. and use of material
and use of material

Nearly sufficient and


Detailed, correct and
Very short, poor correct details about Very detailed, correct,
quality sketches, methods, material, clear description of clear description of
Details about methods, precautions and methods, materials, methods, materials,
Report precautions and
6 material, precaution conclusion. But clarity precautions and
Preparation
and conclusions is not there in a conclusions. Enough
Conclusions.
omitted, some details presentation. But not tables, charts and
Sufficient Graphic
are wrong enough graphic sketches
Description.
description.

Major information is Includes major Includes major Well organized,


not included, information but not information and well includes major
7 Presentation
information is not well well organized and not organized but not information, well
organized. presented well presented well presented

Replied to a
Could not reply to a Replied properly to a
considerable number of Replied most of the
8 Viva considerable number of considerable number
questions but not very questions properly
questions. of questions.
properly
Annexure – IV

Micro-Project Evaluation Sheet

Name of Student :TAHILIANI ADITYA PARMANAND Enrollment No: 1900040161 .

Name of Program: COMPUTER ENGINEERING. Semester : THIRD .

Course Title : DATA STRUCTURE USING C Course Code:: DSU (22317) .

Title of the Micro-project: Sorting Linked list using Bubble Sort.

Course Outcomes Achieved:

CO1: Perform basic operations on arrays.


CO2: Apply different Searching and Sorting techniques.
CO4: Implement basic operations on Linked List.

Sr. Poor (Marks Average Good (Marks Excellent Sub


No. Characteristic to be assessed 1-3) (Marks 4-5) 6-8) (Marks 9- 10) Total

A. Process and Product Assessment (6 Marks)

1 Relevance to the course


Literature Survey / Information
2 Collection

Completion of the Target as per


3 project proposal

Analysis of Data and


4 representation

5 Quality of Prototype/Model
6 Report Preparation

B. Individual Presentation/ Viva (4 Marks)


7 Presentation

8 Viva

Comments/Suggestions about teamwork/leadership/interpersonal communication (if any):


………………………………………………………………………………………………………....…
Name and designation of the Faculty Member: Mrs. Alka Prayagkar, Lecturer.

Dated Signature: ……………………………………..

*************

You might also like