Birthday Cake Candles

  • + 0 comments

    Here is my c++ solution, you can watch the video explanation here : https://youtu.be/zcWbM-aaopc

    #include <bits/stdc++.h>
    
    using namespace std;
     
    int main (){
        int s;
        cin >> s;
        vector<int> arr(s);
        for(int i = 0; i < s; i++){
            cin >> arr[i];
        }
        cout << count(arr.begin(), arr.end(), *max_element(arr.begin(), arr.end()));    
        return 0;
    }