A pattern searching function that uses Bad Character Heuristic of Boyer Moore Algorithm
function search ( txt , pat ) { let m = pat . length ; let n = txt . length ; let badchar = new Array ( NO_OF_CHARS ) ;