package body Graph_Tests is function Is_Permutation (Left, Right : in Array_Type) return Boolean is Marked_Off : array (Right'Range) of Boolean := (others => False); Same_Count : Natural := 0; begin if Left'Length = 0 and Right'Length = 0 then return True; end if; if Left'Length /= Right'Length then return False; end if; for L in Left'Range loop for R in Right'Range loop if Left (L) = Right (R) and not Marked_Off (R) then Marked_Off (R) := True; Same_Count := Same_Count + 1; exit; end if; end loop; end loop; return Same_Count = Left'Length; end Is_Permutation; end Graph_Tests;