习题主要选自Orelly出版的《数据结构与算法javascript描述》一书。
参考代码可见:https://github.com/dashnowords/blogs/tree/master/Structure/Stack
基本练习
根据栈的特性实现一个Stack类,并在后续题目中需要用栈时使用它。
编写一个函数unitTrans(num,unit),num为一个10进制数字,unit要转换的进制数,求转换结果。
编写一个函数recursion(num),num为一个10进制数字,要求输出num!的结果