Quick actions

cmd+k|ctrl+k

Navigation

Languages

sandbox

Snippet info

Language

Cpp

Visibility

public

Author

vagabondtechie

Created

2018-12-06T12:03:19Z

Updated

2018-12-11T14:06:07Z

#include <iostream>
#include <map>
using namespace std;

int main() {
    map <int, int> arr;
    int v[] = {10, 5, 3, 4, 3, 5, 6};
    for(int i=0; i<7;i++) {
        if(arr.find(v[i]) == arr.end())
            arr.insert({v[i], i});
        else
            cout << "Index is" << i << endl;
    }
    cout << "Hello World!";
    return 0;
}
INFO