File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -4468,8 +4468,8 @@ In order to achieve greater coverage and encourage more people to contribute to
44684468 </a>
44694469 </td>
44704470 <td> <!-- Scala -->
4471- <a href="./CONTRIBUTING.md ">
4472- <img align="center" height="25" src="./logos/github .svg" />
4471+ <a href="./src/scala/Palindrome.scala ">
4472+ <img align="center" height="25" src="./logos/scala .svg" />
44734473 </a>
44744474 </td>
44754475 <td> <!-- Kotlin -->
Original file line number Diff line number Diff line change 1+ def isPalindrome (content : String ): Boolean = {
2+ val sanitizedContent : String = content.replaceAll(" \\ W" , " " ).toLowerCase
3+ sanitizedContent == sanitizedContent.reverse
4+ }
5+
6+ object Main extends App {
7+ val data : Seq [String ] = Seq (
8+ " " ,
9+ " a" ,
10+ " abba" ,
11+ " No lemon, no melon" ,
12+ " Was it a palindrome?"
13+ )
14+ data.foreach(x => println(s " ' $x' is a palindrome? ${isPalindrome(x)}" ))
15+ }
You can’t perform that action at this time.
0 commit comments