Question: C++ PROGRAM (STRINGS ARE NOT ALLOWED-use CHARACTER ARRAYS) Function Prototype TO USE : bool FindSubString(char* Str, char* substr,int & start, int & end); Given a
C++ PROGRAM (STRINGS ARE NOT ALLOWED-use CHARACTER ARRAYS)
Function Prototype TO USE : bool FindSubString(char* Str, char* substr,int & start, int & end);
Given a char array, find if a subarray exists in that array. The array has to be treated as circular. Your function should return a Boolean true or false.
For Example: Consider the following array, abcdab Input: cda Output : return true , start =2 , end=4 Input: dababc Output : return true , start =3 , end=2 Input: bad Output : return false , start =-1 , end=-1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
