请问对于下面的代码,怎样能只在while补全代码,就能使该函数达到单链表反转的效果!请大家帮帮忙!
class Node {
int data;
Node next;
}
public Node reverse(Node head) {
Node newhead = null;
Node current = head;
while (current != null) {
}
return newhead;
}
请问对于下面的代码,怎样能只在while补全代码,就能使该函数达到单链表反转的效果!请大家帮帮忙!
class Node {
int data;
Node next;
}
public Node reverse(Node head) {
Node newhead = null;
Node current = head;
while (current != null) {
}
return newhead;
}
4 回答1.4k 阅读✓ 已解决
4 回答1.2k 阅读✓ 已解决
1 回答2.6k 阅读✓ 已解决
2 回答728 阅读✓ 已解决
2 回答1.7k 阅读
2 回答1.7k 阅读
2 回答1.3k 阅读