-
-
Save Preetiraj3697/ec5889c816831454d38e7ca70ca50a13 to your computer and use it in GitHub Desktop.
Sparse Arrays Hackerrank Solution by Rahul Bhatija
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.hackerrank.com/challenges/sparse-arrays | |
// Simple JavaScript solution | |
function matchingStrings(strings, queries) { | |
return queries.map(x=>strings.filter(y=>y===x).length) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment