in reply to Re^2: Odometer pattern iterator (in C).
in thread Odometer pattern iterator (in C). (Updated.)
Translating that regex into C is trivial: (1) Find rightmost occurence of substring '01' (we are done if there is none), (2) change '01' to '10', (3) reverse the string to the right of that.
Finding the indices of the '1's is also simple.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Odometer pattern iterator (in C).
by BrowserUk (Patriarch) on May 29, 2015 at 12:36 UTC | |
by hdb (Monsignor) on May 29, 2015 at 12:59 UTC | |
by BrowserUk (Patriarch) on May 29, 2015 at 13:10 UTC | |
by hdb (Monsignor) on May 29, 2015 at 13:13 UTC | |
by BrowserUk (Patriarch) on May 29, 2015 at 14:34 UTC | |
|