Skip to content

feat: add Deque data structure with tests and README#2157

Open
shahidansari311 wants to merge 1 commit intotrekhleb:masterfrom
shahidansari311:feat/deque-data-structure
Open

feat: add Deque data structure with tests and README#2157
shahidansari311 wants to merge 1 commit intotrekhleb:masterfrom
shahidansari311:feat/deque-data-structure

Conversation

@shahidansari311
Copy link
Copy Markdown

What this PR adds

A Deque (double-ended queue) data structure backed by the existing LinkedList.

Why it belongs here

The repo has Queue and Stack but no Deque. A Deque generalises both —
elements can be added/removed from either end in O(1) time.

Files added

  • src/data-structures/deque/Deque.js — implementation
  • src/data-structures/deque/__test__/Deque.test.js — 14 tests, 100% coverage
  • src/data-structures/deque/README.md — explanation, complexity table, use cases, references

Checklist

  • npm run lint passes (zero errors)
  • npm test passes (14/14 tests)
  • 100% code coverage
  • README includes Big O analysis and reference links
  • One PR for one data structure

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