Can it be solved in O(n) time?

I have written code which works in o(nlogn) time and want to solve it in n time…