File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
- // # Rapin karp pattern searching algorithm
2
- // # Best and average time complexity - O(n+m)
3
- // # Worst case time complexity [O(nm)] when all characters of pattern and text are same
1
+ // Rapin karp pattern searching algorithm
2
+ // Best and average time complexity - O(n+m)
3
+ // Worst case time complexity [O(nm)] when all characters of pattern and text are same
4
4
// as the hash values of all the substrings of txt[] match with hash value of pat[]
5
5
6
6
#include < bits/stdc++.h>
@@ -72,8 +72,8 @@ int main()
72
72
return 0 ;
73
73
}
74
74
75
- // # Description
76
- // Rabin karp is one of the efficient algorithm for pattern searching.
77
- // It uses the concept that calculate the hashvalue for pattern
78
- // Also calculate for substring of m characters and equate it with that of pattern one
79
- // If it matches means 1 pattern found
75
+ // Description
76
+ // Rabin karp is one of the efficient algorithm for pattern searching.
77
+ // It uses the concept that calculate the hashvalue for pattern
78
+ // Also calculate for substring of m characters and equate it with that of pattern one
79
+ // If it matches means 1 pattern found
You can’t perform that action at this time.
0 commit comments