Skip to content
Sign upLog in
← Back to Community

5.6. Strings: Second occurrence

Profile icon
pole55

"Given a string that may contain a letter p. Print the index of the second occurrence of p. If the letter p occurs only once, then print -1, and if the string does not contain the letter p, then print -2."

Voters
Profile icon
asd2007e
Profile icon
martinsmadalans
Profile icon
PokmanDeng1
Profile icon
LOUISKROEGER
Profile icon
TyreseJohnJohn
Profile icon
Yaw_SnrSnr
Profile icon
tomsfy
Profile icon
rumaysa1
Profile icon
PhucNguyen22
Profile icon
riyaj303
Comments
hotnewtop
Profile icon
AmirElangouri

Coderdojo!?