TypeScript Are Equally Strong
function areEquallyStrong(
  yourLeft: number,
  yourRight: number,
  friendsLeft: number,
  friendsRight: number
): boolean {
  return (
    Math.max(yourRight, yourLeft) === Math.max(friendsLeft, friendsRight) &&
    Math.min(yourLeft, yourRight) === Math.min(friendsRight, friendsLeft)
  );
}

This compares each person’s strongest and weakest arm. If both pairs match, the result is true.