question–>
code–>
it is showing segmenetation fault help!!!
Top K Frequent Elements
make size A (maxi+1)
vector A[maxi+1];
now segmentation fault will not shown but answer will come wrong
because of wrong logic
what si wrong with the logic?
you have to sort the array A to get correct output
but how will you sort the array of vectors
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.