Android devices have an unlock pattern screen represented by a
Given two integers m and n, return the total number of unique and valid unlock patterns with a length between m and n inclusive.
A valid unlock pattern satisfies the following rules:
Each pattern consists of a sequence of distinct buttons.
The length of the sequence must be at least m and at most n.
Moving between two consecutive buttons is valid if the direct line segment between them does not pass through any other button, or if every intermediate button lying directly on that line segment has already appeared earlier in the sequence.
Constraints:
m, n
Android devices have an unlock pattern screen represented by a
Given two integers m and n, return the total number of unique and valid unlock patterns with a length between m and n inclusive.
A valid unlock pattern satisfies the following rules:
Each pattern consists of a sequence of distinct buttons.
The length of the sequence must be at least m and at most n.
Moving between two consecutive buttons is valid if the direct line segment between them does not pass through any other button, or if every intermediate button lying directly on that line segment has already appeared earlier in the sequence.
Constraints:
m, n