mercredi 10 février 2021

How can we add element to map

how to store element in map<int,int>mp so that they are stored in non increasing order. Usually map stores in non decreasing order

// code goes here
  {5->7,4->9,3->9}

  map<int,int>mp;
    mp[5]=7;
    mp[3]=9;
    mp[4]=9;

Aucun commentaire:

Enregistrer un commentaire