📜  C++ 计算有序数组的众数 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:54.659000             🧑  作者: Mango

代码示例1
int counter = 0;
    for (int pass = 0; pass < size - 1; pass++)
        for (int count = pass + 1; count < size; count++) {
            if (array [count] == array [pass])
                counter++;
            cout << "The mode is: " << counter << endl;