Can we use inbuilt sort with map?

sir,how can we sort map using value? can we use inbuilt sort with comparator?

hello @khushi91200
refer this link
they have discussed all approach for sorting map by value

can we use inbuilt sort with comparator and why? like this: sort(m.begin(),m.end(),mycompare))

no u cannot. … …

sir inbuilt sort does not work on map?

no,it does not work on map.

ok sir got it!!!