Skip to content

Conversation

@aakankshasuvarna27
Copy link

  1. Simplified the comparison
  2. The logic uses a more efficient StringBuilder to reverse the string
  3. Fixed typos such as Sting (in the main method) and System.out.prinltn
  4. Closed the Scanner to prevent resource leaks
  5. Used equals() instead of compareTo() since we are simply checking for equality

1. Simplified the comparison 
2. The logic uses a more efficient StringBuilder to reverse the string
3. Fixed typos such as Sting (in the main method) and System.out.prinltn
4. Closed the Scanner to prevent resource leaks
5. Used equals() instead of compareTo() since we are simply checking for equality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant