Count Anagrams at MathWorks

Hard37.0% acceptance

This problem has 87.5% frequency at MathWorks.

Problem Description

You are given a string `s` containing one or more words. Every consecutive pair of words is separated by a single space `' '`. A string `t` is an **anagram** of string `s` if the `ith` word of `t` is a **permutation** of the `ith` word of `s`. * For example, `"acb dfe"` is an anagram of `"abc de...

Read full problem and hints

Topics


More MathWorks Questions

View all MathWorks questions