problemscpp
A collection of my answers to algorithm problems in c++.
acwing
acwing66
Solution
静态 Public 成员函数
|
所有成员列表
acwing::acwing66::Solution类 参考
#include <
acwing.h
>
静态 Public 成员函数
static
ListNode
*
findFirstCommonNode
(
ListNode
*headA,
ListNode
*headB)
详细描述
在文件
acwing.h
第
1621
行定义.
成员函数说明
◆
findFirstCommonNode()
ListNode
* acwing::acwing66::Solution::findFirstCommonNode
(
ListNode
*
headA
,
ListNode
*
headB
)
static
在文件
acwing.cpp
第
5052
行定义.
5052
{
5053
unordered_set<ListNode *> nodes;
5054
for
(
auto
*current = headA; current !=
nullptr
; current = current->next) {
5055
nodes.insert(current);
5056
}
5057
for
(
auto
*current = headB; current !=
nullptr
; current = current->next) {
5058
if
(nodes.contains(current)) {
5059
return
current;
5060
}
5061
}
5062
return
nullptr
;
5063
}
该类的文档由以下文件生成:
acwing.h
acwing.cpp
制作者
1.9.2