Skip to content

Add Soutution CPP[228 && 283] #119

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

Merged
merged 1 commit into from
Nov 23, 2018
Merged

Add Soutution CPP[228 && 283] #119

merged 1 commit into from
Nov 23, 2018

Conversation

KongJHong
Copy link
Contributor

None.

if(count > 0)
str = to_string(nums[idx])+"->"+to_string(nums[idx+count]);
else
str = to_string(nums[idx]);
Copy link
Member

Choose a reason for hiding this comment

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

这里与上面的 if/else ,若改为三元表达式会更简洁~

@yanglbme yanglbme merged commit d2d01ba into doocs:master Nov 23, 2018
@KongJHong
Copy link
Contributor Author

KongJHong commented Nov 23, 2018 via email

@yanglbme
Copy link
Member

@KongJHong
三元表达式如果较长,一般都会折行表示的~

var a = condition 
      ? aaaa
      : bbbb;

@KongJHong
Copy link
Contributor Author

KongJHong commented Nov 24, 2018 via email

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