At 2:48 ,pls explain the meaing of line 10(lambda expression)
Explanation doubt
hello @vatsal50
that is comparator that will order character in decreasing order of their frequency in priority queue
pls tell in terms of comparator function
I am ok with c++. Just help me with function
bool cmp(char x ,char y ) {
return mp[x]<mp[y]; // this will build a max heap over the frequency of characters
}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.