0% found this document useful (0 votes)
8 views10 pages

Data Structures Lab Manual Exercises

Uploaded by

yaminishrvani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views10 pages

Data Structures Lab Manual Exercises

Uploaded by

yaminishrvani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DATA STRUCTURES LAB MANUAL

EXERCISE 1: Array implementation of Stack, Queue and Circular Queue ADTs

AIM:
To implement array implementation of stack, queue and circular queue adts.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to array implementation of stack, queue and circular queue adts was executed
successfully.

EXERCISE 2: Implementation of Singly Linked List

AIM:
To implement implementation of singly linked list.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.
PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of singly linked list was executed successfully.

EXERCISE 3: Linked list implementation of Stack and Linear Queue ADTs

AIM:
To implement linked list implementation of stack and linear queue adts.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...
RESULT:
The program to linked list implementation of stack and linear queue adts was executed
successfully.

EXERCISE 4: Implementation of Polynomial Manipulation using Linked list

AIM:
To implement implementation of polynomial manipulation using linked list.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of polynomial manipulation using linked list was executed
successfully.

EXERCISE 5: Implementation of Evaluating Postfix Expressions, Infix to Postfix


conversion

AIM:
To implement implementation of evaluating postfix expressions, infix to postfix conversion.
ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of evaluating postfix expressions, infix to postfix
conversion was executed successfully.

EXERCISE 6: Implementation of Binary Search Trees

AIM:
To implement implementation of binary search trees.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}
OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of binary search trees was executed successfully.

EXERCISE 7: Implementation of AVL Trees

AIM:
To implement implementation of avl trees.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of avl trees was executed successfully.

EXERCISE 8: Implementation of Heaps using Priority Queues

AIM:
To implement implementation of heaps using priority queues.
ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of heaps using priority queues was executed successfully.

EXERCISE 9: Implementation of Dijkstra’s Algorithm

AIM:
To implement implementation of dijkstra’s algorithm.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}
OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of dijkstra’s algorithm was executed successfully.

EXERCISE 10: Implementation of Prim’s Algorithm

AIM:
To implement implementation of prim’s algorithm.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of prim’s algorithm was executed successfully.

EXERCISE 11: Implementation of Linear Search and Binary Search

AIM:
To implement implementation of linear search and binary search.
ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of linear search and binary search was executed
successfully.

EXERCISE 12: Implementation of Insertion Sort and Selection Sort

AIM:
To implement implementation of insertion sort and selection sort.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}
OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of insertion sort and selection sort was executed
successfully.

EXERCISE 13: Implementation of Merge Sort

AIM:
To implement implementation of merge sort.

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of merge sort was executed successfully.
EXERCISE 14: Implementation of Open Addressing (Linear Probing and
Quadratic Probing)

AIM:
To implement implementation of open addressing (linear probing and quadratic probing).

ALGORITHM:
Step 1: Start the program.
Step 2: Initialize necessary variables and data structures.
Step 3: Follow the logic to perform the desired operation.
Step 4: Display the results.
Step 5: Stop the program.

PROGRAM:
// Program code to be written here
/* Example code structure */
int main() {
// Your logic here
return 0;
}

OUTPUT:
Sample Output:
Enter elements...
Result displayed here...

RESULT:
The program to implementation of open addressing (linear probing and quadratic probing)
was executed successfully.

You might also like