-
Notifications
You must be signed in to change notification settings - Fork 4
Tests/binarysearch #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ueue tests for mixed types and non-destructive front
…nce example usage
…lementations - Deleted the entire 'docs' React app including package.json, public assets, and source files. - Introduced new implementations for stack and queue data structures in separate files under 'linear' directory. - Updated the main entry points for stack and queue to reference the new implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request modularizes the stack and queue implementations into separate files, enhances test coverage with comprehensive edge cases, improves example scripts with better error handling and local import paths, and removes the unused React documentation app to clean up the repository.
- Refactored stack and queue classes from the main index.js into dedicated files under the linear/ directory
- Added extensive test coverage for stack and queue data structures with edge cases and mixed data types
- Updated example scripts to use local module paths and include constructor validation
Reviewed Changes
Copilot reviewed 27 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| index.js | Simplified to export stack and queue from dedicated module files |
| linear/stack.js | New dedicated stack implementation module |
| linear/queue.js | New dedicated queue implementation module |
| stack.js | New convenience export wrapper for stack module |
| queue.js | New convenience export wrapper for queue module |
| tests/stack.test.js | Enhanced with comprehensive test cases covering edge cases and mixed data types |
| tests/queue.test.js | Added thorough test coverage for queue operations and data types |
| uses/convertToBinary.js | Improved with better naming, input validation, and wrapper function |
| tests/convertToBinary.test.js | Expanded test coverage for binary conversion edge cases |
| examples/*.js | Updated to use local import paths and added constructor validation |
| nonLinear/binarySearchTree.js | Fixed null parameter handling in tree view methods |
| docs/* | Removed entire React documentation app |
| .github/workflows/npm-publish.yml | Updated Node.js version from 16 to 22 |
| .github/ISSUE_TEMPLATE/support.md | Added new support issue template |
| package.json | Version bump to 3.1.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This pull request primarily removes the React-based documentation app from the
docs/directory, updates example scripts for correct module paths and improved error handling, and modularizes the stack and queue implementations. It also updates the Node.js version in the npm publish workflow and adds a support issue template.Documentation and Example Updates:
docs/such aspackage.json,README.md, build artifacts, and source files. This cleans up the repository by removing unused or outdated documentation tooling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]examples/Priority_Queue.jsandexamples/binarysearchtree.js) to use correct local module paths, add constructor checks with error messages, and provide more comprehensive usage demonstrations. [1] [2] [3]Core Library Refactoring:
index.jsto delegate stack and queue exports to new dedicated files inlinear/stack.jsandlinear/queue.js, and moved their class implementations accordingly. [1] [2] [3]Build and Maintenance Improvements:
Bug Fixes:
nonLinear/binarySearchTree.jswherelevelOrdercould fail if called without arguments, by defaulting to the root node.