we give 5 elements in a priority queue and we are getting only 4 elements at the output
Sir ans is wrong
sir its in the video ,in the video sir gave 5 elements in priority queue but get s only 4 elements
@pankajsingh
hello pankaj,
yeah u are right there is a mistake in the video.
actually we r reading only n-1 element because we are iterating from 1 to n-1 (bhaiya missed the eqaulity sign)
because n is 5 , n-1 will be 4 so the progam will only take first 4 as input and output the same 4 numbers in some order
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.