499,596 views
6 votes
6 votes
Implement a function with signature transfer(S, T) that transfers all elements from stack S onto stack T, so that the element that starts at the top

of S is the first to be inserted onto T, and the element at the bottom of S
ends up at the top of T.

User Bobby Oster
by
2.6k points

1 Answer

10 votes
10 votes
I’ve took engineering but never learnt this lol
User Erik Allen
by
2.8k points