79742512

Date: 2025-08-21 15:44:19
Score: 1
Natty:
Report link

function findSuffix(word1, word2) {
  let i = word1.length;
  let j = word2.length;

  while (i > 0 && j > 0 && word1[i - 1] === word2[j - 1]) {
    i--;
    j--;
  }

  return word1.slice(i);
}
console.log(findSuffix("sadabcd", "sadajsdgausghabcd"));

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: masoudiofficial