source code of stacknqueue