![]() |
VOOZH | about |
Given a string str and a corner string cs, we need to find out whether the string str starts and ends with the corner string cs or not.
Examples:
Input : str = "geeksmanishgeeks", cs = "geeks" Output : Yes Input : str = "shreya dhatwalia", cs = "abc" Output : No
Algorithm
Implementation:
Yes
Time Complexity: O(n)
Auxiliary Space: O(1)