maximum contigsum of an array which contains positive as well as negative number