• + 0 comments

    First solution change the list in-place, so Time: 0(n) Space: 0(1)

    Second solution one create another list, so: Time: 0(n) Space: 0(n)