Skip to content

AyaaMohammed/DataStructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures in C

This repository contains C implementations of fundamental data structures: Stack and Queue, implemented using both arrays and linked lists.


📂 Folder Structure

DataStructure/
├── Stack_Array_Based/       → Stack implementation using arrays
├── Stack_Linked_Based/      → Stack implementation using linked lists
├── Queue_Arary_Based/       → Queue implementation using arrays
├── Queue_Linked_Based/      → Queue implementation using linked lists
└── README.md                → Project documentation

🧱 Implemented Structures

✅ Stack (Array-Based)

  • push(), pop(), peek(), isEmpty(), isFull()
  • Fixed-size array logic
  • Used for evaluating postfix expressions and function call stacks

✅ Stack (Linked List-Based)

  • Dynamically growing stack using singly linked list
  • Supports all standard stack operations

✅ Queue (Array-Based)

  • Circular queue logic using array
  • enqueue(), dequeue(), isEmpty(), isFull()

✅ Queue (Linked List-Based)

  • Queue using linked list with front and rear pointers
  • No fixed size limitation

⚙️ How to Run

🛠 Requires: GCC compiler or any standard C compiler

📦 Compile

Navigate to any folder and compile the source:

cd Stack_Array_Based
gcc main.c -o stack_array
./stack_array

Do the same for other folders:

  • Stack_Linked_Based
  • Queue_Arary_Based
  • Queue_Linked_Based

Replace main.c with the correct file if needed.


🧪 Example Output

Stack operations:

Pushed: 10
Pushed: 20
Popped: 20
Top: 10

Queue operations:

Enqueued: 5
Enqueued: 9
Dequeued: 5
Front: 9

🧑‍💻 Author

Aya Mohamed Nafed
LinkedIn


📄 License

This project is open-source and available under the MIT License.

About

DataStructure using c programming implement stack array based&& stack linked based && Queue array based && queue linked based.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages