This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
Logic in palindrome a number is simple .
suppose you have given number 321 then we can find the reverse of this number by take one number at a time from last position using % operator to find remainder and storing it in some variable which is multiple by 10 and added the reminder value so that no value left.
Then divide the number n=n/10 so that previous last place value removed so that at a time when we are multiple by 10 it does not include.
After this you get palindrome number 123 . then our function check and return true or false .
Which is false bez 321 not equal to 123.
Screenshots(Attach 2 screenshots of your own input and output) -
Eg - If your code follow the below guidelines. Kindly change [] to [x]
All the conditions should be fulfilled for considering your code for merging -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.
palindromeNumber.cpp file is added inside LeetCode folder
https://leetcode.com/problems/palindrome-number/
Choose your form and fill it -
1. Form 1(C++ Solution contributors)
2. Form 2(C++ Documentation Contributors)
1) Form 1
Issue Id you have worked upon -
https://github.com/Meghwantsingh/CPP-Questions-and-Solutions/new/main/LeetCode
Briefly explain your program logic -
Logic in palindrome a number is simple . suppose you have given number 321 then we can find the reverse of this number by take one number at a time from last position using % operator to find remainder and storing it in some variable which is multiple by 10 and added the reminder value so that no value left. Then divide the number n=n/10 so that previous last place value removed so that at a time when we are multiple by 10 it does not include. After this you get palindrome number 123 . then our function check and return true or false . Which is false bez 321 not equal to 123.
Screenshots(Attach 2 screenshots of your own input and output) -
https://drive.google.com/drive/u/0/folders/1qeMR2jb0cNwo5FxZvx1bEbKQvcB2E1OQ
Checklist:
Eg - If your code follow the below guidelines. Kindly change [] to [x]
All the conditions should be fulfilled for considering your code for merging -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.
2) Form 2
Issue Id you have worked upon -
https://leetcode.com/problems/palindrome-number/
Checklist:
Eg - If your code follow the below guidelines. Kindly change [] to [x]
All the conditions should be fulfilled for considering your Pull Request for merging -
[x] I have performed a self-review of my documentation.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.