Angus20190...:""" ArrayList<integer> arrayList = new ArrayList(); Stack<integer> stack = new Stack<>(); LstNode tmp = lstNode; while (tmp != null) { stack.push(tmp.val); tmp = tmp.next; } final int size = stack.size(); for (int i = 0; i < size; i++) { arrayList.add(stack.pop()); } """</integer></integer>
0 点赞 评论 收藏
分享
创作者周榜
更多
关注他的用户也关注了: