Maximum Times Word Removed
Amazon coding interview question: Given a log entry s and a target word t (lowercase letters), determine the maximum number of times t can be removed from s by repeatedly selecting subsets of characters that can be rearranged to form t and deleting them from s. Return the count. This interview problem is asked in Amazon interviews.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
