双向链表
2016-06-29 20:20
253 查看
class NodeList{
int val;
NodeList next ,prev
NodeList(int val ){
this.val=val;
next=prev=null;
}
public NodeList inverse(NodeList head){
ListNode temp = new NodeList();
while(head.next!=null){
temp = head;
head=head.next;
temp.prev=temp.next;
prev=head;
}
}
}
int val;
NodeList next ,prev
NodeList(int val ){
this.val=val;
next=prev=null;
}
public NodeList inverse(NodeList head){
ListNode temp = new NodeList();
while(head.next!=null){
temp = head;
head=head.next;
temp.prev=temp.next;
prev=head;
}
}
}
相关文章推荐
- saiku 分布式实践
- saiku 分布式实践
- Syntax error, annotations are only available if source level is 5.0解决办法
- c++虚函数
- Spring 源码学习之BeanFactoryAware
- 面试
- 基于SpringMVC的RESTful API设计
- Masonry介绍与使用实践(快速上手Autolayout)
- tomcat 应用Message file 'oracle.net.mesg.Message' is missing问题处理
- 数字证书验证
- [2016/06/29] LeetCode / Java - Day 07 -
- Servlet与Jsp重要知识点总结(基础篇)
- 51nod 1393 0和1相等串
- 设计模式之状态模式
- 示波器入门之采样率、存储深度
- js中全局变量声明方式
- Qt学习笔记
- HTML <table> 标签的 frame 属性
- Android之AdapterView及其子类的介绍
- c++纯虚函数