In Computer Science, SHOBHIT-Advance String Search Algorithm is a string searching algorithm created by SHOBHIT UPADHYAYA in 2013. He is working as a Software Developer in Bangalore India.
“This algorithm uses the first and last index of the substring for a pattern search.”
TIME and SPACE Complexity:
For a text of length n and substring of length m.
Its best case, time complexity is O(m/2) and in worst case, time complexity is O(n – (m/2) ).
In all the cases best, average and worst its space complexity is O(1).
This algorithm checks two characters at a time.
In best case where the substring is at the start of the text, we can check all the character of substring in only m/2 time.
In worst case where the substring is at the last of the text, we need to iterate till n – m
For more information please visit the following link:-
Be the first to post a review of SHOBHIT-Advance String Search!