Skip to content

a7medhazem/datastructure

Repository files navigation

Data Structures Implementation in C++

💡 Description

This project is written in C++ and implements several basic data structures using separate header and source files. The goal of this project is to provide practical solutions for different data structures that can be used in various programming applications.

🛠️ Implemented Data Structures

  • Array: Implementation of the Array data structure with operations like insertion, deletion, and resizing.
  • Single Linked List: Implementation of a single linked list with operations such as insertion and deletion.
  • Double Linked List: Implementation of a double linked list that allows traversal in both directions.
  • Queue (Array): Queue implemented using an array.
  • Queue (Linked List): Queue implemented using a linked list.
  • Stack (Array): Stack implemented using an array.
  • Stack (Linked List): Stack implemented using a linked list.
  • Tree: Binary tree implementation with insertion, deletion, and search operations.

🚀 How to Run

  1. Open the project in a development environment like Code::Blocks or Visual Studio.
  2. Build the code and run the main.cpp file to test the various data structures.

🗂️ Files and Folders

  • main.cpp: The main file to run the code.
  • include/: Contains header files for all data structures.
  • src/: Contains the corresponding source files for the data structures.

Each data structure has its own header and source file, for example, Array.h and Array.cpp, QueueArray.h and QueueArray.cpp, etc.

🔧 Available Operations

Array

  • insert_end, resize, insert_position, remove_last, remove_position, isempty

Single Linked List

  • insert_lift, insert_right, remove_lift, remove_right, insert_at_position, searchh

Double Linked List

  • insert_lift, insert_right, remove_lift, remove_right, reverse2, sort

Queue (Array)

  • enqueue, dequeue, getfront, getrear, isempty, isfull

Queue (Linked List)

  • enqueue, dequeue, getfront, getrear, isempty

Stack (Array)

  • push, pop, get_top, is_Full, is_Empty

Stack (Linked List)

  • push, pop, get_top, is_Full, is_Empty, sortt

Tree

  • insert_element, remove_element, search_element, print_pre_order, print_in_order, print_post_order, get_height

📬 Contact

About

This repository contains C++ implementations of fundamental data structures, each organized with separate header and source files. It includes practical solutions for arrays, linked lists, queues, stacks, and trees, providing a solid foundation for various programming applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages