amadeu01
05/28/2019, 5:17 PMamadeu01
05/28/2019, 5:18 PMSerVB
05/28/2019, 5:21 PMPavlo Liapota
05/28/2019, 5:23 PMs where s[i] is sum of door widths from a(0) to a(i-1).
When I need to place doors starting from door i and I have len width available I do binary search for possible doors placed from i to n and I know the sum of all door’s width from i to j using s[j] - s[i].