Given a set of unsigned integers. How can I find the bit-permutation so that the maximum number is minimal?
Ad column with least ones: In the example above the two columns that must be swapped have the same number of ones in them.
-
-
So you'd have to recursively try them all. If on average your danger set halves with each column, I think you still get an acceptable time complexity. BRB, writing code... *nerd sniped*
-
This is what I was going for https://gist.github.com/pepijndevos/76de3cd3187bd16889ea95302a2e05f4 …
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.