It's so odd that the only nontrivial example code in the paper is completely buggy. The find longest common prefix function of a list of strings fails (try ["a", "bc", "ade"]).
HN user
rokicki
For Cochlear brand your kit should include backup coils, and replacement is overnight. If you turn on lights (child mode) the processor lights indicate streaming with blue. I love my cochlear implants even though the integration UI and reliability is not perfect yet.
It should take 105 repetitions:
https://alpha.twizzle.net/explore/?alg=%28U+R%29105
Unless by "same direction" you mean "opposite direction", in which case 63 works:
Nice blog post, but I really wish the author knew how to use apostrophes. (Or the difference between its and it's, if it's not the typographical character he doesn't like.) It's just so jarring to be reading along and be tripped up all the time with grammatical mistakes.
This expression is nonzero iff reverse(a) > reverse(b) (where reverse is the bitreversal of an unsigned number).
It (using the address of the nodes as arguments) can serve as a tiebreaker in a Cartesian tree (such as one implementing a first-fit memory allocator) or even to replace the random priority value in a treap (meaning you need neither storage nor computation for the priority node of the treap).
There's a nice elegant description of what it does, mathematically, and a significant use in Computer Science.
To take this to the next level: what does [(a^b) & (-(a^b)) & a] compute? (Assume unsigned arithmetic.)
And then after that: what use can this be put to?
To solve a particular position, I just use level-by-level breadth-first search until a level contains two values that are reverses of each other.
To explore the entire state space of possible initial positions, I use a number of tricks; I'll be writing that up pretty soon. I've explored through n=12 already, and expect to finish n=13 and n=14 pretty soon. I'm not sure if I'll be able to do n=15.
And by the way, I've found a position for n=14 that requires 206 moves to solve.
Finished with a full-state search of 12; worst case is indeed 130. Found a game for n=14 that takes 172 moves: 6 11 8 2 7 10 9 12 4 1 14 3.
Finished with a full state-space search of 11; worst case is indeed 106 (vs 126 for 10).
Here are the maximum number of steps required through 10, and likely maximum number of steps required through 12:
6: 14 7: 26 8: 74 9: 86 10: 126 11: 106 (?) (full state space not explored) 12: 130 (?) (full state space not explored)