Determine if a string is squeezable: Difference between revisions

Content added Content deleted
No edit summary
mNo edit summary
Line 439: Line 439:


=={{header|C++}}==
=={{header|C++}}==
The solution is a straightforward application of the standard library function "unique".

<lang cpp>
<lang cpp>#include <algorithm>
#include <algorithm>
#include <string>
#include <string>
#include <iostream>
#include <iostream>
Line 474: Line 473:
test(truman, 'r');
test(truman, 'r');
return 0;
return 0;
}</lang>
}
</lang>


{{out}}
{{out}}