Pergunta de entrevista da empresa Oracle

Dynamic Programming on Arrays/Lists. Asked to write a program to find set of array segments(i to j index) whose sum is 0 in an Array without changing the order of elements in the array. Solve in O(n).