- Character game
- 2024-03-29 12:01:55 @
Prerequisite : Basic String
Problem statement summary : You are given a string which contains only character p and q. Check whether p > q or q > p or p = q.
Solution : First you need to count the frequency of p and q. if occurrence of p is greater than q then print Roy or vice versa. If equal then print Draw.
Time Complexity : O (|S|)
0 comments
No comments so far...
Information
- ID
- 1040
- Difficulty
- 9
- Category
- Beginners Click to Show
- Tags
- (None)
- # Submissions
- 9
- Accepted
- 6
- Accepted Ratio
- 67%
- Uploaded By