Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a6e5276

Browse files
committed
feat: add test code
1 parent d301eda commit a6e5276

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

‎00-code(源代码)/src/com/hi/dhl/algorithms/other/template/sort/BubbleSort.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* desc : 冒泡排序
88
* </pre>
99
*/
10+
1011
public class BubbleSort implements ISort {
1112

1213
@Override

‎offer/algorithm/07-zhong-jian-er-cha-shu-lcof.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ class Solution {
150150
}
151151
152152
private final int getRootIndex(int[] inorder, int key) {
153-
for (int i = 0; i < preorder.length; i++) {
154-
if (preorder[i] == key) {
153+
for (int i = 0; i < inorder.length; i++) {
154+
if (inorder[i] == key) {
155155
return i;
156156
}
157157
}

‎offer/algorithm/11-xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Solution {
7676
int right = numbers.length - 1;
7777
7878
while (left < right) {
79-
int mid = (left + right) >>> 2;
79+
int mid = (left + right) >>> 1;
8080
if (numbers[mid] < numbers[right]) {
8181
right = mid;
8282
} else if (numbers[mid] > numbers[right]) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /