Thursday, February 13, 2014

Text Processing (notes)

String Operation

String class to represent immutable strings, which cannot be modified, and StringBuffer class to represent mutable strings, which can be modified.

StringBuffer:  sppend(Q):   insert(i, Q);   reverse();   charAt(i);
Pattern Matching Algorithms

1. Brute Force

The brute force algorithmic design pattern is a powerful techniques for algorithm design when we have something we wish to search for or when we wish to optimize some function. In applying this technique in a general situation we typically enumerate all possible configurations of the inputs involved and pick the best of all these enumerated configurations.

1


2. The Knuth-Morris-Pratt Algorithm

 

 

No comments:

Post a Comment