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

palindrome problems added #806

Closed
wants to merge 0 commits into from

Conversation

PradeepFSTdhane123
Copy link
Contributor

@PradeepFSTdhane123 PradeepFSTdhane123 commented Oct 16, 2024

📥 Palindrome in string and number check problem is added.

Fixes #805)

creating a separate file name java and added the problems solution.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas

Copy link

@github-actions github-actions bot left a 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! 🚀

Copy link

@github-actions github-actions bot left a 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.

Copy link

github-actions bot commented Oct 16, 2024

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: Algo | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/algo/ 🔴 24 🟡 84 🟡 75 🟡 71 📄
/algo/docs 🔴 46 🟢 93 🟡 75 🟢 100 📄
/algo/blog 🟡 71 🟢 92 🟢 96 🟡 86 📄

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels labels Oct 17, 2024
Copy link
Owner

@ajay-dhangar ajay-dhangar left a 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.

Copy link
Owner

@ajay-dhangar ajay-dhangar left a 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

Comment on lines 41 to 61
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.
}
}
Copy link
Owner

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
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem solving
2 participants