finish chapter 3 stack and queue