标签: multidimensional-array
我有一个nxm 2-D数组,想要找到数组中每个元素的频率(出现次数)。如何在数组中实现?
Input: [1,2,3;1,2,3;1,2,3] Expected Output: 1 occurred 3 times 2 occurred 3 times 3 occurred 3 times.
谢谢:)