Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Job with bounties 2 problem in Dynamic Programming Category #10

Open
Abhimanyu10 opened this issue May 11, 2020 · 0 comments

Comments

@Abhimanyu10
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant