Skip to content

数组中移动0#8

Merged
codedrinker merged 2 commits intocodedrinker:masterfrom
yuhangtdm:master
May 29, 2019
Merged

数组中移动0#8
codedrinker merged 2 commits intocodedrinker:masterfrom
yuhangtdm:master

Conversation

@yuhangtdm
Copy link
Copy Markdown
Contributor

yuhang-moveZeroes

Copy link
Copy Markdown
Owner

@codedrinker codedrinker left a comment

Choose a reason for hiding this comment

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

添加了多余的异常处理逻辑

public static void moveZeroes(Integer[] nums){
if (nums == null || nums.length == 0){
return;
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

添加异常处理是可以的,但是这里是过度设计,原题中有说明非空数组

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

好的 我修改一下

@codedrinker codedrinker merged commit 446115d into codedrinker:master May 29, 2019
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