I have done this problem with time complexity O( nlogn + n * m ) and space complexity O( 2 * m ). How can i improve this?
Better complexity of Codechef Paying Up
I have done this problem with time complexity O( nlogn + n * m ) and space complexity O( 2 * m ). How can i improve this?