Exercise: Occurrences of a Subarray in an Array
Test your understanding of hashes and arrays by counting the occurrences of all elements of a subarray in an array.
We'll cover the following
Problem statement
In this challenge, you’ll be given an array @array
of strings and a subarray @subarray
of this array, and your task will be to calculate the frequencies of each element of the subarray in the array.
Sample input
Get hands-on with 1400+ tech skills courses.