|
0
D can be done in O(n) if we simply iterate through the prefix and suffix sums as long as one of them is greater than the current cost of covering both the ends -- although O(nlogtotal) is also almost the same |
|
0
Loved the solution for D1B — Stay or Mirror!! |
|
0
how would you do the concatenation of arrays question if there were 3 numbers in each array? |