about | help | code help+videos | done | prefs |
Given two arrays of integers, how many of the elements in the first array are contained in the second array? The first array will always contain at least one value. countOccurrences([4, 5, 6], [7, 4, 9]) → 1 countOccurrences([4, 5, 6], [4, 6, 5, 4, 6, 5]) → 3 countOccurrences([4, 6, 5, 4, 6, 5], [4, 5, 6]) → 6 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300
Copyright Nick Parlante 2017 - privacy