Problem :- MAXDIFF Problem - CodeChef
Solution :- CodeChef: Practical coding for everyone
What is the error in my solution…??
Problem :- MAXDIFF Problem - CodeChef
Solution :- CodeChef: Practical coding for everyone
What is the error in my solution…??
you should add 1 more condition that if (k>n-k) than k=n-k.
Than your code will work fine.
Thanks, Mate.