Check if string ' s ▁ length ▁ ▁ is ▁ less ▁ than ▁ pattern ' s length . If yes then no such window can exist
if ( len1 < len2 ) { cout << " No ▁ such ▁ window ▁ exists " ; return " " ; } int hash_pat [ no_of_chars ] = { 0 } ; int hash_str [ no_of_chars ] = { 0 } ;