Skip to main content

All Questions

Tagged with
3 votes
2 answers
46 views

Ruby: Check for Palindrome (as Monkey-Patch on String-class)

I have written a method, which checks for Palindrome and attached it to the String-class. Here's the code: ...
michael.zech's user avatar
  • 4,358
5 votes
4 answers
725 views

Ruby solution to Project Euler Problem #4: Largest palindrome product

I've solved the Project Euler Problem #4, but I'd like some tips as to how to make this more efficient. I am a beginner to Ruby, so please be nice about the stupid stuffs (but still tell me about it). ...
Sakamoto Kazuma's user avatar
3 votes
4 answers
7k views

Find a palindrome using Ruby

I am preparing for an upcoming exam and have the following practice question.. Write a method to determine if a word is a palindrome, without using the reverse method. Most of you probably know ...
Joe Ainsworth's user avatar
3 votes
3 answers
341 views

Palindrome Validator

This code returns true if the sentence is a palindrome, and false otherwise. Is there a better way of doing this? ...
jstunn's user avatar
  • 31
4 votes
2 answers
2k views

HackerRank challenge - index palindrome

I have a solution but it fails the performance for two tests. How can I speed it up? ...
osman's user avatar
  • 143
16 votes
3 answers
3k views

The Love-Letter Mystery

Problem Statement James got hold of a love letter that his friend Harry has written for his girlfriend. Being the prankster that James is, he decides to meddle with it. He changes all the words ...
Mohammad's user avatar
  • 1,212
4 votes
2 answers
774 views

The Next Palindrome: Is my code efficient?

I was trying to solve the Next Palindrome problem listed in SPOJ in Ruby language. Please find the problem statement here. Though i came up with the below solution, i could not get the execution time ...
abc's user avatar
  • 41