Count the number of adjecencies and breakpoints in a signed permutation.

Assignment

Add the following two methods to the class SignedPermutation:

Example

>>> SignedPermutation(+3, +4, +5, -12, -8, -7, -6, +1, +2, +10, +9, -11, +13, +14).breakpoints()
8