You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arghun-dev edited this page Jul 23, 2021
·
12 revisions
Frequency Counters
this pattern uses objects or sets to collect values/frequencies of values.
this can often avoid the need for nested loops or O(N^2) operations with arrays and strings.
Example
write a function which accepts two arrays. the function should return true if every value in the array has it's corresponding value squared in the second array. the frequency of values must be the same.