+ 2

Can someone provide me with a c++ code to get all subsequence of a string(code should work in tubo c++ ).

eg-- input = abc output= a b c ab ac bc abc

20th Oct 2018, 7:13 AM
Saksham Narula
Saksham Narula - avatar
5 odpowiedzi
+ 2
there is no fixed string lenght so function can be recursive
20th Oct 2018, 7:37 AM
Saksham Narula
Saksham Narula - avatar
+ 1
thank you but i was looking for a simpler code
21st Oct 2018, 4:09 AM
Saksham Narula
Saksham Narula - avatar
+ 1
https://youtu.be/KCEPvdLqlYI i found this on youtube but substr function does not work in turbo c ++
21st Oct 2018, 5:35 AM
Saksham Narula
Saksham Narula - avatar
+ 1
substr is not in string header file of turbo c++
21st Oct 2018, 5:54 AM
Saksham Narula
Saksham Narula - avatar
0
should be simple enough by using substr function.. i can do it if you really need help. for this i would use only vector, substr and for loops
22nd Oct 2018, 6:06 AM
Kuyondo
Kuyondo - avatar