Linked lists#63
Conversation
* add check if list is changed in-place * bugfix: wrong return value in problem IBAN * fix: co-pilot suggestions * bugfix: wrong function name in "Sudoku2" html * add some test to filter invalid zeilen solutions (if i get bool variable) * fix: Ruff format
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Problem Summary: 78 total✅ Passed: 77 |
There was a problem hiding this comment.
Pull request overview
This pull request adds a comprehensive suite of linked list exercises to support data structures and algorithms curriculum. The PR also includes minor corrections to existing exercises.
Key Changes
- Six new linked list exercises with complete HTML documentation, test suites, and configuration files
- Enhanced test coverage for the rotate exercise with in-place modification checks
- Corrections to IBAN exercise (expected values and spelling)
- Spelling fixes in Sudoku2 exercise documentation
Reviewed changes
Copilot reviewed 38 out of 46 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| linkedStack/* | New exercise: Implement a stack data structure using a linked list with push, pop, and peek operations |
| linkedRemove/* | New exercise: Remove a specific element from a linked list |
| linkedMerge/* | New exercise: Merge two sorted linked lists into one sorted list |
| linkedInsert/* | New exercise: Insert a new node at the end of a linked list |
| linkedFind/* | New exercise: Search for a value in a linked list and return the node |
| linkedAfter/* | New exercise: Insert a new node after a specific node in a linked list |
| zeilen/checks/main.py | Added two additional test cases for rowMult function (examples 3 and 4) |
| sudoku2/html/* | Fixed spelling errors (Suduko→Sudoku) and updated function name references from isValid to isValidBlock |
| iban/html/* | Corrected expected check digit value (23→27) and fixed grammar errors |
| rotate/checks/main.py | Enhanced tests to verify in-place list modification behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def a(self, b): | ||
| c = self.head | ||
| while c is not None: | ||
| if c.value == b: | ||
| return c | ||
| c = c.next | ||
| return None |
There was a problem hiding this comment.
The helper function 'a' has a non-descriptive single-letter name that makes the code difficult to understand. This appears to be implementing searchValue functionality but should have a meaningful name like 'search_value_for_test' or similar to clarify its purpose in the test suite.
| def a(self, b): | ||
| c = self.head | ||
| while c is not None: | ||
| if c.value == b: | ||
| return c | ||
| c = c.next |
There was a problem hiding this comment.
The function parameter names 'b' and 'c' are non-descriptive single-letter names. Consider using meaningful names like 'value' for the parameter being searched and 'current' for the traversal variable to improve code readability.
| def a(self, b): | |
| c = self.head | |
| while c is not None: | |
| if c.value == b: | |
| return c | |
| c = c.next | |
| def a(self, value): | |
| current = self.head | |
| while current is not None: | |
| if current.value == value: | |
| return current | |
| current = current.next |
Co-authored-by: Copilot <[email protected]>
No description provided.