Erlang Are Equally Strong
-module(are_equally_strong).
-export([are_equally_strong/4]).
are_equally_strong(YourLeft, YourRight, FriendsLeft, FriendsRight) ->
max(YourRight, YourLeft) =:= max(FriendsLeft, FriendsRight) andalso
min(YourLeft, YourRight) =:= min(FriendsRight, FriendsLeft).
This compares each person’s strongest and weakest arm. If both pairs match, the result is true.