Skip to content

hamzalafsioui/Data-Structures-Implementation

Repository files navigation

Data Structures Implementation

Doubly Linked List (clsDblLinkedList)

The clsDblLinkedList class provides a template-based implementation of a doubly linked list with the following features:

  • Insertion: Methods to insert elements at the beginning, end, or after a specific node, ensuring proper linkage.
  • Deletion: Operations to remove nodes from the list while maintaining integrity and updating pointers.
  • Traversal and Search: Functions to traverse the list, print its elements, find specific values, and retrieve elements by index.
  • Modification: Support for updating values of nodes at specific positions and reversing the list for efficient manipulation.

Queue Implementation (clsMyQueue)

The clsMyQueue class represents a queue data structure based on the doubly linked list implementation. Key features include:

  • Enqueue and Dequeue: Methods for adding elements to the back of the queue and removing elements from the front, maintaining FIFO order.
  • Front and Back Access: Functions to access the front and back elements of the queue for efficient data handling.
  • Size and Empty Check: Operations to check the size of the queue and determine if it's empty for proper queue management.
  • Printing and Visualization: Capability to print the queue elements and visualize the queue status for monitoring purposes.

Stack Implementation (clsMyStack)

The clsMyStack class extends the functionality of a stack using the doubly linked list implementation. It includes:

  • Push and Pop: Methods for pushing elements onto the stack and popping elements off the top, ensuring LIFO behavior.
  • Top and Bottom Access: Functions to access the top and bottom elements of the stack for stack-based operations.
  • Inheritance: Inherits functionalities from clsMyQueue to leverage queue operations for stack functionality.
  • Printing and Visualization: Capability to print stack elements and visualize the stack status for debugging and analysis.

Queue Line Management (clsQueueLine)

The clsQueueLine class implements a queue line management system with features such as ticket issuance, client service, and queue visualization. It includes:

  • Ticket Issuance: Capability to issue tickets with a specified prefix and average service time.
  • Queue Operations: Methods for adding clients to the queue, serving clients, and checking queue status.
  • Client Information: Ability to track ticket numbers, time of issuance, waiting clients, and expected service times.
  • Ticket Display: Functions to display tickets in various formats, including right-to-left and left-to-right.
  • Queue Visualization: Visualization of the queue with ticket numbers and serving status.

Dynamic Array Implementations (clsMyQueueArr and clsMyStackArr)

These classes provide implementations of queues and stacks using dynamic arrays (clsDynamicArray). Key features include:

  • Push and Pop: Methods for adding elements to the data structure (push) and removing elements (pop).
  • Access Operations: Functions to access the front/back elements of the queue or top/bottom elements of the stack.
  • Size and Empty Check: Operations to check the size of the data structure and whether it's empty.
  • Item Modification: Capability to update items at specific indices or insert items after a given index.
  • Reverse: Functionality to reverse the order of elements in the data structure.
  • Clear: Method to clear all elements from the data structure.

Undo/Redo Project (clsMyString)

The clsMyString class implements an Undo/Redo mechanism for managing string operations. Features include:

  • String Manipulation: Methods to set, update, and retrieve string values, maintaining a history of changes.
  • Undo and Redo: Functions for undoing and redoing string modifications, allowing users to revert or apply changes as needed.
  • Console Interface: Sample usage demonstrating Undo/Redo functionality with string operations for practical application scenarios.

Contributing:

  • Feel free to contribute to this project by providing feedback, suggesting new features, or submitting pull requests,For any questions contact us at hamzalafsioui@gmail.com

About

This repository contains C++ implementations of common data structures such as doubly linked lists, queues, and stacks, along with a practical implementation of an Undo/Redo mechanism.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages