A repo for the implementation of basic Algorithms, Data structures and their implementation.
- Write a program to convert prefix expression to postfix.
- Write a program to convert infix expressions to postfix.
- Write a program to evaluate postfix expressions.
- Write a program to simulate a queue of customers in a bank. Customers must be served one at a time and the customer that has been waiting the longest must be served first.
- Implement a stack using a circularly linked list with the following operations:
- push - Inserts an element into the stack.
- pop - Dispalys and delets an element at the top of the stack.
- top - Displays the elemet at the top of the stack.
- isEmpty - Returns true if the stack is empty and false otherwise.
- isFull - Returns true if the stack is full and false otherwise.
- Implement a queue using a circularly linked list with the following operations:
- enqueue - Inserts an element at the end of the queue.
- dequeue - Displays and deletes an element from the front of the queue.
- rear - Dispalys the last element of the queue.
- front - Displays the first element of the queue.
- isEmpty - Returns true if the queue is empty and false otherwise.
- isFull - Returns true if the queue is full and false otherwise.
- Implement the following tree traversal techniques:
- Inorder traversal
- Preorder traversal
- Postorder traversal
- Implement a binary search tree (BST). Your implementation must support the following operations:
- searchBST(root, targetKey): Search a BST for the requested key
- addBST(root, newNode): Add a node to the BST
- deleteBST(rot, keyToDelete): Delete a node from the BST
- Implement heap data structure and use it to implement an ascending priority queue.
- Implement graph data structure. Use your implementation to create some graphs, and then perform depth-first search (DFS) and breadth-first search (BFS) on them.
- Implement Kruskal's algorith for finding a minimum spanning tree and apply it on a graph.
- Implement Prim's algorithm for finding a minimum spanning tree and apply it on a graph.
- Implement graph data structure and use it to create a newtork of friends. Use graph traversal methods to find friends in this network.
- Implement linear search and binary search.
- Implement the following sorting algorithms:
- Bubble Sort
- Heap Sort
- Insertion Sort
- Merge Sort
- Selection Sort
- Quick Sort