• + 1 comment

    exactly...it's better to follow up with "Reversal algorithm". Follows O(n) time complexity without the usage of any temp storage. Hence saves storage and time both