Skip to content
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

Simplified boolean logic? #229

Open
SeanPMulligan opened this issue Mar 15, 2022 · 1 comment
Open

Simplified boolean logic? #229

SeanPMulligan opened this issue Mar 15, 2022 · 1 comment

Comments

@SeanPMulligan
Copy link

First off, thank you so much for all the time and effort building and maintaining this repo. It's been a huge boon to my learning in problem solving and algorithmic approaches. I had one small comment regarding one of the C++ solutions. For the problem string_integer_interconversion could the following assignment be simplified from

  bool is_negative = false;
  if (x < 0) {
    is_negative = true;
  }

to:

  bool is_negative = x < 0;

Again thanks to all the maintainers for your work 🎉

@yadunandanbhat
Copy link

Yes thats would look better too! I would like to help!

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

No branches or pull requests

2 participants