Rearranging ABC

ABC 377

Problem 39 of 50

Easy

What to do

Check if a 3-character string can be rearranged to spell 'ABC'. Return 'Yes' if it contains exactly one A, one B, and one C; 'No' otherwise.

Key Concepts

if-statements string manipulation comparison

Examples

Input: s = 'BAC'

Output: Yes

Input: s = 'AAC'

Output: No

Tips for Beginners

  • Focus on understanding the logic, not memorizing syntax
  • Use print statements to debug your code
  • Don't worry about input parsing - the function handles that for you
  • If stuck, try writing out your solution on paper first

Python Editor

Loading Python...