Passing Algorithm challenges without using Algorithms

Continuing the discussion from avaScript Algorithms and Data Structures Projects: Palindrome Checker #2:

Hey, I’m just checking and asking. In this exercise, the user are supposed to write an algorithm to check if it’s a palindrome. But this user did not do that, but TRIED to bypass it just by trying to get all the statement correct. Here’s his code that I corrected: (spoiler)

function palindrome(str)  { 
  if (str=="eye") return true;
  if (str == "_eye") return true;
  if (str =="race car") return true; 
  if (str == "not a palindrome") return false; 
  if (str == "A man, a plan, a canal. Panama") return true;
  if (str == "never odd or even") return true; 
  if (str == "nope") return false; 
  if (str == "almostmola") return false; 
  if (str == "My age is 0, 0 si ega ym.") return true;  
  if (str== "1 eye for of 1 eye.") return false; 
  if (str == "0_0 (: /-\ :) 0-0") return true; 
  if (str == "five|\_/|four") return false; 

  var str = [];

  for (i=0; i<str.length; i++) {
  str.join([0,1], [1,0])
  }
}
console.log(palindrome("eye"));

This will solve the challenge, but not using an algorithm. Is this okay for the curicullum, or is there a way to prevent this, or is it just fine to do this (which I think is not).

if it is one of the projects, it may need tests a bit more strict.
it could also work by adding obscured tests, where the text doesn’t explicitly say what’s the string (like a test that say “It should work with any string” and there are a couple of functions in that too, without showing them)

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

1 Like

Thank you @ilenia,

I have created an issue in Github Issues about this matter.