Report problem solving - Find substring

topic

Core code

flow chart

The difficulties encountered and problem-solving ideas

The main problem-solving ideas is the same as the first character string and find the mother substring substring position has been to determine the end, the whole idea is not difficult, but requires
the details strictly controlled. I myself have met such as not using j directly use i, leading to the final return is not the first address; if the statement k and tlen the
relationship is difficult to judge, but in the end take more than scratch paper with the compiler tried several times to get it ; as well as for the last cycle k to cleared, otherwise the contrast is not the first character of the substring
, and this error is difficult to find out. In doing title string to be very detail-oriented

Guess you like

Origin www.cnblogs.com/BruceWaynehyh/p/12048486.html