#include <leetcode.h>
◆ mergeNodes()
ListNode * leetcode::merge_nodes_in_between_zeros::Solution::mergeNodes |
( |
ListNode * |
head | ) |
|
|
static |
在文件 leetcode.cpp 第 3192 行定义.
3193 while(head !=
nullptr && head->val == 0) {
3197 while(head !=
nullptr && head->next !=
nullptr) {
3198 if(head->next->val != 0) {
3199 head->val += head->next->val;
3200 head->next = head->next->next;
3202 head->next = head->next->next;
引用了 leetcode::ListNode::next , 以及 leetcode::ListNode::val.
该类的文档由以下文件生成: