Skip navigation.

Algorithm Cracking

String

Morris-Pratt

My dear friend, did you hear that I am an addicted geek? No?!
Well, a bit...

Today, I am glad to inform you that today, on Sunday (yes, on Sunday...) I cracked Morris-Pratt algorithm of string matching. As for me, this is a bit tricky algorithm because it uses statements like table[table[index]] (double index nesting).

So far, so good....

Ah, yes, I started working with Visual Studio 10 and Visual SVN.

A new C++ features, like auto and lambda expressions - are delicious! It is amazing, how we may leave without automatic type deduction before?!

typedef ::std::map< ::std::string, ::std::pair<unsigned, ::std::list<int> > > crazy_map_type;
crazy_map_type map;
for (auto it (mab.begin()); it != map.end(); ++it) {
auto data = *it;
}


Yes, I like it!

Karp-Rabin

Today is the 12th of September, 2009, and I am glad to officially announce that I have implemented a Karp-Rabin's algorithm of string searching. Hurrah, my dear comrades.
November 2009
M T W T F S S
October 2009December 2009
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30