Skip to content

Add C implementations for stack, queue, and deque examples#1857

Open
CodeTrailblazer-Lyra wants to merge 4 commits intokrahets:mainfrom
CodeTrailblazer-Lyra:main
Open

Add C implementations for stack, queue, and deque examples#1857
CodeTrailblazer-Lyra wants to merge 4 commits intokrahets:mainfrom
CodeTrailblazer-Lyra:main

Conversation

@CodeTrailblazer-Lyra
Copy link

This PR adds C language implementations for the data structure examples.

Changes:

  • Implemented stack using an array.
  • Implemented queue using front and rear pointers.
  • Implemented deque (double-ended queue) using an array.

The implementations follow the logic of the existing Python examples and help demonstrate how these data structures can be implemented in C.

  • I have thoroughly reviewed the code.
  • I have confirmed that the outputs are consistent with the reference code.
  • The code is compatible with Windows, macOS, and Ubuntu.

Added C implementation of stack operations including push, pop, peek, and size.
Added a C implementation of a queue with basic operations.
Added C implementation of a deque with operations for adding, removing, and accessing elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant