We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Sparse Arrays
- Discussions
Sparse Arrays
Sparse Arrays
Sort by
recency
|
395 Discussions
|
Please Login in order to post a comment
Scala
Code in Go, Please suggest if any optimization can be done.
func matchingStrings(strings []string, queries []string) []int32 { // Write your code here var count int32=0 var stringCount[] int32 for _,query:=range queries{ for _,match:=range strings{ if(query == match){ count = count + 1 } } stringCount = append(stringCount,count) count = 0 }
return stringCount }
My C# solution