Skip to content

Improve run back#64

Open
MMachmerth wants to merge 18 commits intogit2025from
improve_run_back
Open

Improve run back#64
MMachmerth wants to merge 18 commits intogit2025from
improve_run_back

Conversation

@MMachmerth
Copy link
Copy Markdown
Contributor

No description provided.

@hsd-problem-testing
Copy link
Copy Markdown

hsd-problem-testing bot commented Jan 7, 2026

Problem Solution Type Status Message
binary invalid_1 invalid
binary invalid_2 invalid
binary valid_1 valid
binary valid_2 valid
bogo invalid_1 invalid
bogo invalid_2 invalid
bogo invalid_3 invalid
bogo valid_1 valid
bogo valid_2 valid
bubble invalid_1 invalid
bubble invalid_2 invalid
bubble invalid_3 invalid
bubble valid_1 valid
bubble valid_2 valid
divide-integers alt_1 valid
divide-integers alt_2 valid
divide-integers invalid_1 invalid
divide-integers invalid_2 invalid
divide-integers invalid_3 invalid
einsen valid_1 valid
einstein alt_1 valid
emojize alt_1 valid
emojize alt_2 valid
emojize invalid_1 invalid
extensions alt_1 valid
extensions alt_2 valid
faces alt_1 valid
hackers valid_1 valid
hello alt_1 valid
iban valid_1 valid
insert invalid_1 invalid
insert valid_1 valid
interpreter valid_1 valid
intervals invalid_1 invalid
intervals valid_1 valid
intervals valid_2 valid 🔴
ReasonResults for /tmp/tmpt3s5k7gn/problems/intervals generated by check50 v3.4.0 :) file exists checking that intervals.py exists... :) intervals.py compiles compiling intervals.py into byte code... :) merge function defined checking that intervals.py exists... importing intervals.py... :) merges touching intervals checking that intervals.py exists... importing intervals.py... :( merges unsorted intervals correctly merge returned the wrong list. Expected: [[1, 7]] Got : [[4, 7]] checking that intervals.py exists... importing intervals.py... :) merges separated intervals checking that intervals.py exists... importing intervals.py... :) merges multiple overlapping intervals checking that intervals.py exists... importing intervals.py... :) handles intervals nested within others checking that intervals.py exists... importing intervals.py... :) returns same interval if only one provided checking that intervals.py exists... importing intervals.py... :) returns [] for empty input checking that intervals.py exists... importing intervals.py... :) returns intervals unchanged if none overlap checking that intervals.py exists... importing intervals.py... :) merges chain overlaps where intervals connect indirectly checking that intervals.py exists... importing intervals.py... :) does not use forbidden built-ins or operators To see more detailed results go to file:///tmp/tmp0w6sjfv1.html
linear valid_1 valid
linear valid_2 valid
linkedAfter valid_1 valid
linkedFind valid_1 valid
linkedInsert valid_1 valid
linkedMerge valid_1 valid
linkedRemove valid_1 valid
linkedStack valid_1 valid
luhn valid_1 valid
merge invalid_1 invalid
merge invalid_2 invalid
merge invalid_3 invalid
merge invalid_4 invalid
merge valid_1 valid
merge valid_2 valid
merge valid_3 valid
merge valid_4 valid
nadel alt_1 valid
neuner ⚠️
ReasonNo tests found
palindrom invalid_1 invalid
palindrom valid_1 valid
playback alt_1 valid
rotate invalid_1 invalid
rotate valid_1 valid
rotate valid_2 valid
rotate valid_3 valid
rotate valid_4 valid
run_back invalid_1 invalid
run_back invalid_2 invalid
run_back invalid_3 invalid
run_back valid_1 valid
strings alt_1 valid
stufen valid_1 valid
stufen valid_2 valid
sudoku1 valid_1 valid
sudoku1 valid_2 valid
sudoku1 valid_3 valid
sudoku2 valid_1 valid
tip alt_1 valid
willkommen alt_1 valid
zahlenjagd alt_1 valid
zeilen invalid_1 invalid
zeilen invalid_2 invalid
zeilen valid_1 valid
zeilen valid_2 valid

Problem Summary: 81 total

✅ Passed: 79
🔴 Failed: 1
⚠️ Warnings: 1

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 adds new linked list programming exercises and improves an existing binary search exercise for what appears to be a data structures and algorithms course. The changes include HTML templates for exercise instructions (in German), automated test suites, and configuration files.

Key changes:

  • Updated the run_back exercise to use a 4-parameter binary search function with explicit low/high indices
  • Added 6 new linked list exercises covering fundamental operations (search, insert, remove, merge, stack implementation)
  • Included comprehensive test coverage and HTML documentation for each exercise

Reviewed changes

Copilot reviewed 34 out of 43 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
run_back/html/template.html Updated binary search exercise to use explicit low/high parameters with validation code
run_back/checks/main.py Updated all test cases to pass low/high indices (0, len-1) to binary_recursive function
linkedStack/* New exercise implementing a stack using a linked list with push/pop/peek operations
linkedRemove/* New exercise for removing elements from a linked list
linkedMerge/* New exercise for merging two sorted linked lists
linkedInsert/* New exercise for inserting elements at the end of a linked list
linkedFind/* New exercise for searching values in a linked list
linkedAfter/* New exercise for inserting elements after a specific node

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{% include "file.html" %}
Implementieren Sie die folgende Funktion in Ihrer Datei:
Implementieren Sie die folgende Funktion in Ihrer Datei. Die Überpüfung der Array Grenzen
ist bereits erfolgt, vervollständigen Sie den Code für der rekursive Suche:
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The German text contains a typo: "Überpüfung" should be "Überprüfung". Additionally, "für der rekursive Suche" contains a grammatical error - it should be "für die rekursive Suche" (feminine article for "Suche").

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +83
print(binary_recursive(list, 8, low=0, high=len(list))) # Erwartet: 2
list = [11, 13, 15, 17, 18]
print(binary_recursive(list, 17, low=0, high=len(list))) # Erwartet: 3
list = [3, 4, 5, 6, 7]
print(binary_recursive(list, 1, low=0, high=len(list))) # Erwartet: -1
list = []
print(binary_recursive(list, 13, low=0, high=len(list))) # Erwartet: -1
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test examples in the HTML template use high=len(list) but the actual tests in main.py use len(list) - 1. This inconsistency will cause confusion for students. The HTML template should match the test implementation and use len(list) - 1 for the high parameter.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +35
def a(self, b):
c = self.head
while c is not None:
if c.value == b:
return c
c = c.next
return None
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name a with parameter b and variable c is not descriptive. This appears to be a helper function for searching values in a linked list. Consider using meaningful names like search_value_impl for the function, value for the parameter, and current for the variable to improve code readability.

Copilot uses AI. Check for mistakes.
# Perform a search that requires recursion
result = module.binary_recursive([1, 2, 3, 4, 5, 6, 7], 6)
list = [1, 2, 3, 4, 5, 6, 7]
result = module.binary_recursive(list, 6, 0, len(list) - 1)
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable result is not used.

Copilot uses AI. Check for mistakes.
@MMachmerth MMachmerth force-pushed the improve_run_back branch 2 times, most recently from e025493 to 6bb2cc2 Compare January 7, 2026 08:19
@MMachmerth MMachmerth requested a review from Copilot January 7, 2026 08:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 43 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +33
list = [6, 7, 8, 9, 10]
result = module.binary_recursive(list, 8, 0, len(list) - 1)
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name "list" shadows the built-in Python type. This is a Python anti-pattern that should be avoided. Consider using a more descriptive name like "test_list" or "values" instead.

Copilot uses AI. Check for mistakes.
print(binary_recursive([11, 13, 15, 17, 18], 17)) # Erwartet: 3
print(binary_recursive([3, 4, 5, 6, 7], 1)) # Erwartet: -1
print(binary_recursive([], 13)) # Erwartet: -1
list = [6, 7, 8, 9, 10]
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name "list" shadows the built-in Python type. This is a Python anti-pattern that should be avoided. Consider using a more descriptive name like "test_list" or "values" instead.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +81
list = [11, 13, 15, 17, 18]
high_idx = len(list) - 1
print(binary_recursive(list, 17, low = 0, high = high_idx)) # Erwartet: 3

list = [3, 4, 5, 6, 7]
high_idx = len(list) - 1
print(binary_recursive(list, 1, low = 0, high = high_idx)) # Erwartet: -1

list = []
high_idx = len(list) - 1
print(binary_recursive(list, 13, low = 0, high = high_idx)) # Erwartet: -1
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name "list" shadows the built-in Python type. This is repeated across all test examples in this section. Consider using "test_list" or "values" instead throughout.

Copilot uses AI. Check for mistakes.
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.

2 participants