Site Message

Only Premium Users can view the Question

Site Message

Only Premium Users can view the Question

Site Message

Only Premium Users can view the Question

Site Message

Only Premium Users can view the Question

Site Message

Only Premium Users can view the Question

Question: Google | SWE | Online Screening | 22-08-2020
3
Entering edit mode
For a string of lowercase alphabets you are allowed to perform 2 types of operations.

1. Remove the substring "pr" and gain X points.
2. Remove the substring "rp" and gain Y points.

Find the maximum points that you can gain.

Example
abcdpabcpprrrprp , X=4 , Y=5
Output :: 18

ADD COMMENTlink 5.0 years ago Shubhendu Goel • 450

Login before adding your answer.

APPLY NOWSimilar Posts
Loading Similar Posts