Matrix frequencies
Question
Given a matrix of order m*n
, find the frequency of even and odd numbers in the matrix.
For example:
#Given the following inputs
m = 2, n = 3
[[ 9, 11, 3 ],
[ 4, 12, 2 ]]
#Your function should return the following output:
#Frequency of odd #: 3 (since 9, 11, and 3 are all odd #s)
#Frequency of even #: 3