Relative Content

Tag Archive for array

Reverse subarray of an array with O(1)

I have an idea how to implement sub array reverse with O(1), not including precalculation such as reading the input. I will have many reverse operations, and I can’t use the trivial solution of O(N).

Reverse subarray of an array with O(1)

I have an idea how to implement sub array reverse with O(1), not including precalculation such as reading the input. I will have many reverse operations, and I can’t use the trivial solution of O(N).

Reverse subarray of an array with O(1)

I have an idea how to implement sub array reverse with O(1), not including precalculation such as reading the input. I will have many reverse operations, and I can’t use the trivial solution of O(N).