Can anyone pls help me solve Q3 in the given document
https://1drv.ms/b/s!Al9xIYmMuIkqiDdWAcp0ddaFYJFF?e=fJkBBz
Can anyone help me solve this question
i think dequeue can be implemented here but am not getting the logic…
You want me to write the code? Because the logic is explained in the 2 paras written below, i.e., you maintain a queue of finish times , and whenever a new element comes ,pop those elements whose finish time was less, so that the buffer size is again maximised. If there is space then insert the element, otherwise drop it.
it would be good if u write the code…
I have tried the code here…pls check
Thanks in advance…
Okay I’ll write a simpler implementation. Please Wait.
i think some error is there in the else part…
thnx…
its not giving any o/p…getting sigsegv
yea sure i am trying…
still am getting the same sigsegv…lets debug
Is it giving sigsegv for sample? The new code which I sent?
yeah its giving sigsegv for the sample
It shouldn’t ,please click on the new code its running fine on the hackerblocks ide.
yeah its running…net problem sorry…
Okay if you don’t have any further doubts please mark this as resolved.