Skip to content

Conversation

@potrue
Copy link
Owner

@potrue potrue commented Aug 23, 2025

class Solution {
public:
void moveZeroes(vector<int>& nums) {
int non_zero_index = 0;

Choose a reason for hiding this comment

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

non_zero_index でも良いと思います。見方を変えると、これまでに見つかった非ゼロ要素の数なので num_non_zero_items としてもわかりやすいです。

Choose a reason for hiding this comment

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

+1 です

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.

4 participants