• + 1 comment

    JavaScript One-Line Solution

    function catAndMouse(x, y, z) {
      return Math.abs(z - x) === Math.abs(z - y) ? "Mouse C" : Math.abs(z - x) > Math.abs(z - y) ? "Cat B" : "Cat A"
    }