• + 0 comments

    Just another minor optimization that could be also done is post doing sum and negate , instead of running loop from 1 to N , by this time we would know min_index and max_index of queries , can run loop only for the same