Title: Sourav Hota — R45-T030: Strengthen the tests of isEmpty (GenericArrayListQueue.java) [src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java] · Issue #30 · S-AI-Projects/TheAlgorithms-Java · GitHub
Open Graph Title: Sourav Hota — R45-T030: Strengthen the tests of isEmpty (GenericArrayListQueue.java) [src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java] · Issue #30 · S-AI-Projects/TheAlgorithms-Java
X Title: Sourav Hota — R45-T030: Strengthen the tests of isEmpty (GenericArrayListQueue.java) [src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java] · Issue #30 · S-AI-Projects/TheAlgorithms-Java
Description: Student: Sourav Hota Task: R45-T030 · 10 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Java Assigned working branch: student/e26b07f0855 Goal Work on src/main/java/com/thealgorithms/datastructures/queues/GenericArrayLi...
Open Graph Description: Student: Sourav Hota Task: R45-T030 · 10 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Java Assigned working branch: student/e26b07f0855 Goal Work on src/main/java/com/thealgorit...
X Description: Student: Sourav Hota Task: R45-T030 · 10 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Java Assigned working branch: student/e26b07f0855 Goal Work on src/main/java/com/thealgorit...
Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Java/issues/30
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sourav Hota — R45-T030: Strengthen the tests of isEmpty (GenericArrayListQueue.java) [src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java]","articleBody":"\u003c!-- sai-task-v1:R45-T030 -->\n\n## Student: Sourav Hota\n\n**Task:** R45-T030 · 10 of 10\n**Repository:** https://github.com/S-AI-Projects/TheAlgorithms-Java\n**Assigned working branch:** `student/e26b07f0855`\n\n## Goal\n\nWork on src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java. Prove that a regression test can detect a plausible one-line mistake in `isEmpty`. Use the fixture and invariant: FIFO order and size agree after each operation; separate instances do not share contents. Fixture: Enqueue A, B and C; remove twice; insert D; drain the queue. The removal order must be A, B, C, D. Exercise the documented empty-state behavior.\n\n## Steps\n\n1. Read src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java, especially `isEmpty` near line 29. Record its public inputs, result, mutation behavior and any external dependencies before changing it.\n2. In a temporary copy, alter one boundary comparison, accumulation or return condition relevant to the algorithm.\n3. Find a valid input for which the original and mutant differ; independently establish the correct output and reduce the input.\n4. Implement work/R45-T030/check.py as a focused runner that executes the new checks and propagates failures. Native check to incorporate: mvn test (JDK 21 as specified in pom.xml); use JUnit in the corresponding src/test/java package. Record the actual command and nonzero test count.\n5. Create the checks specified below and run `python3 work/R45-T030/check.py`. Save inputs, expected versus actual results and tool versions in work/R45-T030/; a check must exit non-zero when an assertion fails.\n6. Commit the repository change on branch R45-T030; prepare a PR to the organisation fork explaining the result and linking the checks. Keep each task independently reviewable. Remove work/R45-T030/ from a later upstream branch.\n\n## Done when\n\n☐ The checked behavior is tied to `isEmpty` in src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java; every assertion has an explicit expected value.\n☐ Enqueue A, B and C; remove twice; insert D; drain the queue. The removal order must be A, B, C, D. Exercise the documented empty-state behavior.\n☐ Existing supported behavior and the public interface are preserved unless a failing regression demonstrates and documents a defect.\n☐ The original passes and the mutant fails the same named assertion for a semantic reason.\n☐ The final implementation contains no mutation or test-only branch.\n\n\u003cdetails>\n\u003csummary>Additional task guidance\u003c/summary>\n\n\nAdditional curated task guidance\n\nItem:\nsrc/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java\n\nTask type:\nMutation-resistant tests\n\nCode change (goes into the PR):\nAdd a focused regression in the normal tests for src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java and document the protected condition. Keep the deliberate mutant out of the final source.\n\nAutomated check:\npython3 work/R45-T030/check.py\n\nPrerequisites:\nJDK 21, Maven and Python 3.\n\nUpstream PR rules:\nFollow the Java style and Maven checks. The project does not accept standalone LeetCode problem additions; a new feature requires an upstream issue first. Submit coursework to the organisation fork first; keep work/ evidence out of any later upstream PR. Upstream acceptance is not a grading requirement. Policy: https://github.com/TheAlgorithms/Java/blob/6edd2d878947c7fb08a6f3286b316eca09fe9200/CONTRIBUTING.md\n\nSource (pinned):\nhttps://github.com/TheAlgorithms/Java/blob/6edd2d878947c7fb08a6f3286b316eca09fe9200/src/main/java/com/thealgorithms/datastructures/queues/GenericArrayListQueue.java#L29\n\nChange:\nReplaces the shared task template with an item-specific contribution brief.\n\nPR destination:\nUpstream candidate after review\n\n\n\u003c/details>\n\n## Submission checklist\n\n- [ ] Complete this task and its checks.\n- [ ] Add the required evidence and link your pull request here.\n- [ ] Select this **S-AI-Projects fork** as the PR base repository.\n- [ ] Request instructor review.\n\nKeep this PR focused on this task. Do not submit assignment PRs to the upstream repository.","author":{"url":"https://github.com/ankushbisht01","@type":"Person","name":"ankushbisht01"},"datePublished":"2026-11-03T22:54:15Z","url":"https://github.com/S-AI-Projects/TheAlgorithms-Java/issues/30"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b7b7f7f-3713-0c76-f3c9-43a92e024f94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D21C:B6856:80BD9C:B51681:6AFDC4A0 |
| html-safe-nonce | 6dce7f1ed7be430aa97781727cd47c57d9ee5c74313f2cd902fb01c4a16c7353 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjFDOkI2ODU2OjgwQkQ5QzpCNTE2ODE6NkFGREM0QTAiLCJ2aXNpdG9yX2lkIjoiMzYxNzgyNzM3MDk5NzQ5OTA0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 64735251bfae8bb142cd2b81fcae0bd48ecd1ee2d5f4c06f1be2b4c01151f5ff |
| hovercard-subject-tag | issue:6192631814 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/S-AI-Projects/TheAlgorithms-Java/30/issue_layout |
| twitter:image | https://opengraph.githubassets.com/544afcf30c7c1914c80bb367dc1c33899477ffae2053bd7210af3118e9655a96/S-AI-Projects/TheAlgorithms-Java/issues/30 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/544afcf30c7c1914c80bb367dc1c33899477ffae2053bd7210af3118e9655a96/S-AI-Projects/TheAlgorithms-Java/issues/30 |
| og:image:alt | Student: Sourav Hota Task: R45-T030 · 10 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Java Assigned working branch: student/e26b07f0855 Goal Work on src/main/java/com/thealgorit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ankushbisht01 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9ab00cc3b4fa90bbd3da70765dd38efc23cfa9d9b0930e41feea2bf67f60ecaf |
| turbo-cache-control | no-preview |
| go-import | github.com/S-AI-Projects/TheAlgorithms-Java git https://github.com/S-AI-Projects/TheAlgorithms-Java.git |
| octolytics-dimension-user_id | 351892385 |
| octolytics-dimension-user_login | S-AI-Projects |
| octolytics-dimension-repository_id | 1444142392 |
| octolytics-dimension-repository_nwo | S-AI-Projects/TheAlgorithms-Java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 63477660 |
| octolytics-dimension-repository_parent_nwo | TheAlgorithms/Java |
| octolytics-dimension-repository_network_root_id | 63477660 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1b795ba060b92691fc16c5a12cf2bf95e83432b4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width