A practice repository for solving LeetCode-style algorithm problems with comprehensive test cases.
This project contains implementations of various data structures and algorithms with comprehensive test cases. Each topic includes implementations and full test suites to verify correctness.
.
├── src/
│ ├── arrays/
│ │ ├── index.js # Array utility functions and solutions
│ │ └── index.test.js # Test cases for array operations
│ └── linked-lists/
│ ├── index.js # Node class implementations
│ └── index.test.js # Test cases for linked list operations
├── package.json # Project dependencies and scripts
└── README.md # This fileInstall the required dependencies:
npm installThis will install Vitest, a modern testing framework for JavaScript.
Run all tests with:
npm testTo watch for changes and re-run tests automatically:
npm test -- --watchNodeclass - Basic node structure withvalueandnextpropertiesreverseLinkedList(list)- Reverse a linked list
- Various array utilities and algorithm solutions
- Runtime: Node.js
- Testing: Vitest
- Language: JavaScript (ES Modules)
ISC