DSU Project
DSU Project
DSU Project
PROJECT REPORT
ON
“Types of sorting”
SUBMITTED BY
Pawar Abhinav Sujit [134]
Paithankar pratik kishor [129]
Sadawarte Gaurav Shrishankar
[144]
SANJIVANI K. B. P. POLYTECHNIC
KOPARGAON – 423601, DIST-AHMADNAGAR
2022-2023
1
Sanjivani Rural Education Society’s
SANJIVANI K. B. P. POLYTECHNIC
DEPARTMENT OF COMPUTER TECHNOLOGY
CERTIFICATE
This is to certify that the Project report entitled
“Types of sorting”
Submitted By
Under our supervision and guidance for partial fulfillment of the requirement for
2022-2023
2
ACKNOWLEDGEMENT
First and the foremost we, express my deep sense of gratitude, sincere thanks and deep
sense of appreciation to Project Guide Mr. V. A. Parjane , Department of Computer
Technology, Sanjivani K.B.P. Polytechnic, Kopargaon. Your availability at any time
throughout the year, valuable guidance, opinion, view, comments, critics, encouragement,
and support tremendously boosted this project work.
We are also thankful to all the faculty members, Computer Technology Department,
Sanjivani K. B. P. Polytechnic, Kopargaon for giving comments for improvement of work,
encouragement and help during completion of the Project.
Last but not the least, we should say thanks from our bottom of heart to my Family &
Friends for their never ending love, help, and support in so many ways through all this time.
Thank you so much.
3
INDEX
CHAP CONTENTS PAGE
T ER NO.
1. Introduction. 5
7. Source Code 16
8. Output 17
9. Reference 18
4
1. INTRODUCTION.
Traversing a tree involves iterating over all nodes in some manner. Because from a
given node there is more than one possible next node (it is not a linear data structure),
then, assuming sequential computation (not parallel), some nodes must be deferred—
stored in some way for later visiting. This is often done via a stack (LIFO)
or queue (FIFO). As a tree is a self-referential (recursively defined) data structure,
traversal can be defined by recursion or, more subtly, corecursion, in a natural and
clear fashion; in these cases the deferred nodes are stored implicitly in the call stack.
Depth-first search is easily implemented via a stack, including recursively (via the call
stack), while breadth-first search is easily implemented via a queue, including
corecursively.
Pre-order, NLR
5
Source code
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
struct BTnode
{
int data;
struct BTnode* leftNode;
struct BTnode* rightNode;
};
7
return rootNode->rightNode;
}
int main()
{
struct BTnode* rootNode = createNode(7);
clrscr();
insertLeftNode(rootNode, 4);
insertRightNode(rootNode, 8);
insertLeftNode(rootNode->leftNode, 1);
insertRightNode(rootNode->rightNode, 5);
insertLeftNode(rootNode->leftNode, 6);
insertRightNode(rootNode->rightNode, 3);
printf("Inorder \n");
inorder(rootNode);
printf("\nPreorder \n");
preorder(rootNode);
printf("\nPostorder \n");
postorder(rootNode);
getch();
return 0;
}
8
OutPut
9
References
https:\\www.google.com https:\\
www.m.youtube.com https:\\
www.developerinsider.co
1
0