Leetcode problem solution needed

problem link


plz tell the corrections in my code

Hey @coderajay03 what is the logic you have applied?
Moreover what do you want to do by using this statement:

            if(i<=26 && i>31)
                  pq.push(i,v[i]);

because in between Z to small ‘a’ there are some special characters so I just don’t want to include them in heap that’s it logic aside there Is compilation error maybe something wrong while using priority queue plz tell the correction

Do you want to insert it as a pair?

yes bhaiya and here only error is coming

Have modified your implementation, Cause you have priority queue of

pair<int,int> , vector<pair<int,int>>
|____________|  |____________________|
       (a)                (b)
(a) so this should be a pair not an int variabe 
whereas (b) should be a vector of pair not int vector 


Hope this will clear your doubt :slight_smile:

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.