Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 617 Bytes

03-Palindrome.md

File metadata and controls

21 lines (14 loc) · 617 Bytes

FizzBuzz

The problem

Write a function f(N) that checks weather N is a palindrome:

  • reads the same front-to-back and back-to-front
  • ignoring punctuation and casing
    • turn the whole string to lower or upper case first

Concepts

  • String and array manipulation
  • String and array methods

Turn the string into an array, and strip it of all punctuation symbols by comparing all individual characters with an allowed characters list.

Lastly, convert the array back to string and create another string by reversing that array.

If the strings match, return true.

Note:

Usually regex would be used