Create ass4.cpp

Implementation of Horspool, Boyer-Moore and Knuth-Morris algorithms