You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Above, I think the first test is "cuter" but is defective because it relies on: (1), the vector starting with TRUE, and (2), the vector is of even length. Neither of these assumptions is necessarily true. The second test just uses the fact that each element is the negation of the previous. Actually, maybe the second test is cuter. I am clearly overthinking this.
Knuth points out that the plain permutation algorithm produces alternating odd and even permutations and verifying this has nice R idiom:
The text was updated successfully, but these errors were encountered: