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

MathBug #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

MathBug #4

wants to merge 4 commits into from

Conversation

vaibhavsethia
Copy link

These two problems were solved by me and were missing in the repo

Copy link
Owner

@cruxrebels cruxrebels left a comment

Choose a reason for hiding this comment

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

Hi @vaibhavsethia ,

Thanks for taking the time out to create a pull request. I really appreciate it since this is your first attempt to contribute in this repo.

I have solutions for these practice exercises but I hadn't committed it here thinking its just code correction problems and not actually original coding questions. But nevertheless I see your point, it's good to have the repo complete with all possible solutions.

Your submission of MathBug_01 is okay but not great, couple of things which you can modify and then we can go ahead and merge it to the mainline:

  1. Please follow the existing pattern and style as in all other solutions, i.e. problem statement with Interviewbit question's page URL enclosed in a block comment before beginning of the code.
  2. The naming convention also does not aligns to what is being followed in this repo, please take note from existing files and rename the file to "MathBug01.cpp" instead of "MathBug_01.cpp".
  3. Your solution uses a lot of parenthesis for single line condition and loops which is not required, the structure of the code snippet can be greatly improved by reducing the number of lines of code to make it a proper concise code as it was originally given in the problem statement. Would be happy to see you try to keep the original code and still making it work just by fixing the bug.

Regarding your submission of MathBug_02.cpp the solution's good, just follow the same pattern as above for naming and styling to commit in this repo.

If you have any queries, reply back, I am here to help. Good luck!

Best,
Abhishek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants