(Hackerrank) HackerRank Python Certification Practice Test
Hackerrank Collections and Data Structures 3
What does `Counter.subtract()` do differently from subtracting two Counters with `-`?
Select your answer
A
subtract() removes zero/negative counts; - does not
B
subtract() allows negative counts; - removes non-positive counts
C
They are identical in behavior
D
subtract() only works with lists, not strings
Hint
✨ Remove Ads & Unlock Every Exam
— From $1.49
🃏 HACKERRANK Flashcards — Study This Quiz as Flip Cards →
📚 Want to go deeper? Read the Full HACKERRANK Study Guide →