frequency [array[i]]++;. If elements are large, then use map data structure in c++. BTW, its an easily googleable question, so please try ...
確定! 回上一頁