Extracted the algorithm to find the longest incremental sequence as max_sequence template. * src/LongestSequencePieceSelector.cc * src/a2algo.h * test/Makefile.am * test/a2algoTest.cc