editorials
editorials copied to clipboard
Issue with Job with bounties 2 problem in Dynamic Programming Category
Issue at: https://github.com/prateek27/editorials/blob/master/Dynamic%20Programming/Job%20For%20Bounties%202.md
The program will give error on execution because the comparator used for sorting the jobs is not correct i.e. it should not contain "<=" .
It should be like : if(x.deadline < y.deadline) return true; else return false;
Also the same above program(After correction) fails to pass on hackerblocks : https://hack.codingblocks.com/app/contests/1043/37/problem
My code which I wrote using top down dp also fails to pass on hackerblocks https://ideone.com/AjY0Yt
I think there is something wrong with the 2nd testcase. because both the program gave same output ("9389") when I ran on that particular test after downloading the testcase(after unlocking) from hackerblocks. Please check and resolve.