- 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
- 1
- Category
- Beginners Click to Show
- Tags
- (None)
- # Submissions
- 66
- Accepted
- 43
- Accepted Ratio
- 65%
- Uploaded By