【C/C++業務】多程序同時讀寫同一個檔案
阿新 • • 發佈:2021-02-11
技術標籤:連結串列/樹演算法
/*function ListNode(x){
this.val = x;
this.next = null;
}*/
function FindFirstCommonNode(pHead1, pHead2)
{
// write code here
var p1 = pHead1
var p2 = pHead2
while(p1!==p2){
p1 = p1 == null ? pHead2 : p1.next
p2 = p2 == null ? pHead1 : p2.next
}
return p1
}
module.exports = {
FindFirstCommonNode : FindFirstCommonNode
};