As WgpShashank once pointed out. Search the whole matrix for the first character instances, for each instance, send the array, string and that char's position to a function that will recursively check its direct neighbors for the next character. Exhaustively check like that for each starting characters appearance till you find the string, if any.
On Fri, Sep 16, 2011 at 11:55 PM, Ankur Garg <ankurga...@gmail.com> wrote: > In a matrix of characters, find an string. String can be in any way (all 8 > neighbours to be considered) > like find Microsoft in below matrix. > > A > C > P > *R > *C* > *X > *S > **O > *P > *C* > V > *O* > V > N > *I* > W > G > *F > **M > *N > Q > A > *T* > I > T > > *Any Ideas How to Solve/Approach this problem ?* > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anup Ghatage -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.