Hello all,

I have this problem to solve, and seek your assistance.

Program should be feeded with following integer inputs.
1. n integers in ascending order (a1,a2,a3...an)
2 an integer K.

We need to find K(k1,k2...kn) integers between [a1..an] both inclusive 
such that the sum of the absolute value of the difference of nearest ai and 
ki is minimum.

I know dynamic programming should be used here, but not able to figure out 
the correct way of doing it.
Any insights.

Thnx.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to