Also it would be helpful if someone could help me figure out what is wrong with the following code for the above question as the code is not able to compute the answer when N=500 : [C++] Ajay Rajnikanh - Wealth Disparity
Also it would be helpful if someone could help me figure out what is wrong with the following code for the above question as the code is not able to compute the answer when N=500 : [C++] Ajay Rajnikanh - Wealth Disparity
Hi can someone help me, with what concepts I should learn to solve this problem?
I think I have done the exact same thing i.e check the last book of a shelf and the first book of the other shelf and swap then K times and sort them each time you swap them
The following code results in 4 WA and I don't know why can anyone help me with it? [C++] Ajay Rajnikanth - Bookshelves
Can someone tell me what is wrong with the following code? [C++] Ajay Rajnikanth
I feel that the second hint is a bit misleading as you say"map dp"and I went searching through the net to find out who you meant but then I realised what I had to do was not complicated at all.
Thanks for your help.
The thing is i haven't learned these algorithms before, I just use whatever logic I think that will give me the answer, is that bad or is it okay to solve these problems without knowing its proper approach?