queue puzzle and stack based caculator