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

Q9_PalindromeNumber #17

Merged
merged 1 commit into from
Oct 2, 2022
Merged

Q9_PalindromeNumber #17

merged 1 commit into from
Oct 2, 2022

Conversation

napalion
Copy link
Contributor

@napalion napalion commented Oct 1, 2022

This is the solution for Question 9- Palindrome Number from LeetCode

This Question asked to verify if an int is Palindrome. Palindrome number is a number that reads the same backward as forward.

First of all, check if the number is negative(negative numbers can not be palindromes!).
This code copies the int given to make sure we don't lose it during the program. After that, we loop through the number and invert all the digits of the given x. At the end, we compare if the number given and the number made are the same, if they are: it means that the integer given is a palindrome(since it is read the same backward and forward), if they are not, the integer is no a palindrome.

Related Issue

Acceptance Criteria

| | Q1
| | Q2
| | Q3
| | Q4
| | Q5
| | Q6
| | Q7
| | Q8
| ✓ | Q9
| | Q10

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

Testing Steps / QA Criteria

Screenshot from 2022-10-01 13-49-00

@DugarRishab
Copy link
Owner

Please provide the screenshot that clearly shows that your submission has passed all the tests. This screenshot just shows that your code just passes the 1st test.

@DugarRishab
Copy link
Owner

GREAT job with using the repo. Will use this as an example on how to properly submit a PR

@napalion
Copy link
Contributor Author

napalion commented Oct 1, 2022

I totally took the wrong screenshot sorry!

image

@DugarRishab
Copy link
Owner

Great !!

@DugarRishab DugarRishab merged commit d900f7a into DugarRishab:main Oct 2, 2022
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.

2 participants