Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
disapearingPairs
donarturo1991
Jul 28th, 2021
614
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
string solution
(
string
&
S
)
{
// write your code in C++14 (g++ 6.2.0)
for
(
short
i
=
0
;
i
<
S.
length
(
)
;
i
++
)
{
if
(
S
[
i
]
==
S
[
i
-
1
]
)
{
S.
erase
(
i
-
1
,
2
)
;
i
=
0
;
}
}
return
S
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
5 hours ago | 88.05 KB
Untitled
7 hours ago | 58.79 KB
z66is_archive.zip.txt
13 hours ago | 1.05 MB
Untitled
16 hours ago | 71.19 KB
Untitled
16 hours ago | 64.82 KB
Untitled
16 hours ago | 88.55 KB
Untitled
16 hours ago | 65.48 KB
Untitled
17 hours ago | 95.14 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!