-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Create insertion_sort.rb #1222
Create insertion_sort.rb #1222
Conversation
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.
Hi @cy-by-side, I have a small comment for this PR, the rest LGTM.
|
||
### 插入排序 ### | ||
def insertion_sort(nums) | ||
n = nums.length() |
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.
n = nums.length() | |
n = nums.length |
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.
thx!
=begin | ||
File: insertion_sort.rb | ||
Created Time: 2024-04-02 | ||
Author: Cy ([email protected]) Xuan Khoa Tu Nguyen ([email protected]) |
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.
Add a comma between the two ids.
### 插入排序 ### | ||
def insertion_sort(nums) | ||
n = nums.length | ||
# 外循环:已排序区间为[0, i-1] |
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.
# 外循环:已排序区间为 [0, i-1]
Please ensure the comments consistent with those 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.
Thanks for the PR!
If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:
If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist: