Codility MinAbsSum Java solution

preview_player
Показать описание
MinAbsSum is the hardest exercise in the lessons section of Codility. The aim is to find a set of numbers consisting of only 1s or -1s. Each element of the set is multiplied by a corresponding element in another given array and the calculated values are added together. The aim is to find the minimum possible sum of values posssible.

The solution is provided by Codility, by Peng Cao. In this video, I implement and explain Peng Cao's solution in Java, scoring 100%.
Рекомендации по теме
Комментарии
Автор

thanks bro. ive read online for solutions but cld nv understand what they're saying. but after u drew the diagram i understood right away. now i can sleep in peace 😅

ngchongpeng
Автор

Great job mate. I went through all lessons as well and this is the most challenging so far. Thank you for sharing these videos with us. :D

salemmaglic
Автор

any way to do it with dynamic programming efficiently?

nishantlakhara
visit shbcf.ru