Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anagram Detection #2

Open
ninjasort opened this issue Mar 6, 2024 · 0 comments
Open

Anagram Detection #2

ninjasort opened this issue Mar 6, 2024 · 0 comments

Comments

@ninjasort
Copy link
Owner

https://github.com/mre/the-coding-interview/tree/master/problems/anagram-detection

Anagram Detection

Write a function that accepts two parameters, a parent and a child string. Determine how many times the child string - or an anagram of the child string - appears in the parent string. There is a solution which can be done in near instant time.

f('AdnBndAndBdaBn', 'dAn') // 4 ("Adn", "ndA", "dAn", "And")
f('AbrAcadAbRa', 'cAda') // 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant