@mzchen It is not similar to find the max sum in an array. In max sum we can discard the previous sum as soon as it is zero. In multipication , we can not do it as product of two negative numbers become positive numbers
Posts made by mittalrishabh
RE: Possibly simplest solution with O(n) time complexity
RE: O(n)+O(1) after median --- Virtual Indexing
Geting elements in sorted order from heap is O(n)(logn). Building heap is O(n).