0

I try to make Burrows Wheeler Transformations

https://code.sololearn.com/crMsU70AACp8/?ref=app My code works fine for one condition but not if the input is empty. So, my function is <pair> returning function with string and integer returning parameters. It is said if the input is empty then you have to ignore integer parameter. But here is a problem because I do not know how to do that. Thank you for your help.

5th Mar 2023, 8:20 PM
TeaserCode
1 Resposta
+ 1
how about std::pair<std::string, int> encode(const std:: string &s = {}) { // function body }
6th Mar 2023, 2:40 AM
Bob_Li
Bob_Li - avatar