-
Notifications
You must be signed in to change notification settings - Fork 0
test the bugbot for python. #4
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| // write a function to sort a list of numbers in maopao sort | ||||||
|
||||||
| def maopao_sort(numbers): | ||||||
|
||||||
| for i in range(len(numbers)): | ||||||
| for j in range(len(numbers) - 1): | ||||||
| if numbers[j] > numbers[j + 1]: | ||||||
| numbers[j], numbers[j + 1] = numbers[j + 1], numbers[i] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Bubble sort uses wrong index in swap operationThe swap operation incorrectly uses
|
||||||
| numbers[j], numbers[j + 1] = numbers[j + 1], numbers[i] | |
| numbers[j], numbers[j + 1] = numbers[j + 1], numbers[j] |
Copilot
AI
Dec 7, 2025
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.
Incorrect comment syntax for Python. Use # instead of // for comments in Python.
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.
Incorrect comment syntax for Python. Use
#instead of//for comments in Python.