hi, can someone please tell me the approach i should take to find the distinct substrings of a string ?
pranay_agg 0 Newbie Poster
Recommended Answers
Jump to PostDo you mean std::string? Yes, then use its find() method. If you mean character array then use standrd C function strstr() which is declared in string.h (or cstring for c++ programs)
Of course you may not be allowed to use either of those if your instructor wants you to …
Jump to Post<deleted>
Jump to PostIf you don't need to print out the actual permutations, then you can
just calculate the number of different permutation.
Maybe something like this would work :return pow(2.0 , double( strlen(str) ) ) - 1;
I don't think so. In "ccccc" there are only 5, but your …
All 12 Replies
VernonDozier 2,218 Posting Expert Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
pranay_agg 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
pranay_agg 0 Newbie Poster
pranay_agg 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
tetron 22 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mrnutty 761 Senior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mrnutty 761 Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.