• + 1 comment

    A stack seems overdoing it in terms of space complexity, it may be less elegant, but more practical to print in place.