Funny logic accepting please do work on this

Hey guys don’t get me wrong but iam so frustrated to solve the Ceasar’s cipher code while i was working on these problem it took me more than 1-2 hours it was hard to crack the solution but it was fun to solve the algorithms challenges.
I tried more than 30-40 times but i didn’t get the solution after getting frustrated i tried this solution

function rot13(str) { // LBH QVQ VG!
   if(str ==="SERR PBQR PNZC")
     return "FREE CODE CAMP";
   if(str ==="SERR CVMMN!")
     return "FREE PIZZA!";
   if(str==="SERR YBIR?")
     return "FREE LOVE?";

// Change the inputs below to test
rot13("SERR PBQR PNZC");

And voila i passed the test which is bit of funny :joy::joy: so i’m requesting to the authority(Quincy Larson) please do work on these kind of problem why it’s accepting and i think its better to put the test cases like in the hackerrank problem and i try to come up with real solution today maybe not tomorrow definitely and lastly sorry for my weak grammer.

Thank you.

This isn’t the solution though, the point is that you can take any encoded string and decode it: the ones in the test are just to check it works.

In your solution, you would have to write every single combination of letters of any length, so you would have to write an infinite number of conditions.

But my main concern is here why its accepting the above solution and iam asking the authority to work on these.
Thank you

Any time that you know what the tests are, you can write a function that just returns the correct answers for those tests. If you really want to, you can create a GitHub Issue to check the code for hardcoded answers. FCC is an open source project, so you could then work on this change to the tests. Anyone has the “authority” to do this. I can tell you that I doubt your ready to do that though at this point.

For any of the challenges, you can “pass” by just writing the correct answers to the tests, but what’s the point?

1 Like

Thanks for your information i doesn’t know that the whole topic that it is an open source and we can contribute to make changes so once again thank you very much.let’s build these place a very strong and after completion of projects and certificates ill work on free code camp and I’ll try my best to make these strong and beautiful i too want to help others like quincy Larson.