I have an array of integers and i want to return part of it but the problem I want to do it in O(log n) or O(1). I have used array.copy() but it\'s O(n). I have
array.copy()