Gapplet
Given a permutation
g
, determine its sign.
Input
g
either as a list or as a product of disjoint cycles, e.g., [1,5,4,2,3] or (1,5,4)(2,3,7)