-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
palindrome problems added #806
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi @PradeepFSTdhane123! Thank you for submitting your first pull request to the Algo project. Great job on the contribution! 🎉 We appreciate your efforts, and our team will review it soon. If you have any questions, feel free to ask. Keep up the great work! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Great job, @PradeepFSTdhane123! Thank you for submitting your pull request. We appreciate your contribution, and our team will review it shortly.
⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to use only .md
files for our docs, so please create a .md
file and follow our syntax and format. Don't write code in any other files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update your code based on suggestions
java/Palindrome_string.md
Outdated
public class Palindrome_string { | ||
public static void main(String[] args) { | ||
Palindrome_string obj = new Palindrome_string(); | ||
boolean ans = obj.Palindrome_string("manad"); | ||
System.out.println(ans); | ||
} | ||
|
||
public boolean Palindrome_string(String str) { | ||
int left=0; | ||
int right =str.length()-1; // last character of string . | ||
|
||
while(left<right){ // Compare characters from both ends | ||
if(str.charAt(left)!=str.charAt(right)){ | ||
return false; | ||
} | ||
left++; //left increment | ||
right--; //right decrement. | ||
} | ||
return true; //i.e all character mathes. | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write this exam within
```java
// your code here
```
32fc1b7
to
83d4b38
Compare
📥 Palindrome in string and number check problem is added.
Fixes #805)
creating a separate file name java and added the problems solution.
Checklist: