Think of linear time and constant space solution


#1

Think of linear time and constant space solution.


#2

Yes, it can be done.