当前位置:网站首页>Leetcode-160 intersecting linked list
Leetcode-160 intersecting linked list
2022-07-01 18:47:00 【It was the sea】

# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def getIntersectionNode(self, headA, headB):
"""
:type head1, head1: ListNode
:rtype: ListNode
"""
p, q = headA, headB
while not p == q:
p = p.next if p else headB
q = q.next if q else headA
return p
边栏推荐
- 1、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》什么是NFT
- How does factor analysis calculate weights?
- Implementation of converting PCM file to WAV
- 斯坦福、Salesforce|MaskViT:蒙面视觉预训练用于视频预测
- Data query language (DQL)
- 磁盘的基本知识和基本命令
- [source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
- C operator overloads the query table
- Memo - about C # generating barcode
- R language epidisplay package ordinal or. The display function obtains the summary statistical information of the ordered logistic regression model (the odds ratio and its confidence interval correspo
猜你喜欢

Unity learning fourth week

Memo - about C # generating barcode for goods

Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application

用WPF写一款开源方便、快捷的数据库文档查询、生成工具

MySQL connection tools
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/92/f3a70e7086aeedf41eea3eef98b5aa.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)

Mysql database of easyclick

What designs are needed in the architecture to build a general monitoring and alarm platform

Lumiprobe lumizol RNA extraction reagent solution

Weekly recommended short videos: be alert to the confusion between "phenomena" and "problems"
随机推荐
The ultimate version of the 13th simulation of the single chip microcomputer provincial competition of the Blue Bridge Cup
Lumiprobe biomolecular quantification - qudye Protein Quantification Kit
Memo - about C # generating barcode for goods
关于企业中台规划和 IT 架构微服务转型
GameFramework食用指南
Principal component calculation weight
Livedata postvalue will "lose" data
[CF1476F]Lanterns
The R language uses the tablestack function of epidisplay package to make statistical summary tables (descriptive statistics based on the grouping of target variables, hypothesis testing, etc.). If th
Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
What if the reliability coefficient is low? How to calculate the reliability coefficient?
用WPF写一款开源方便、快捷的数据库文档查询、生成工具
1380. Lucky number in matrix / 1672 Total assets of the richest customers
Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
搭建一個通用監控告警平臺,架構上需要有哪些設計
540. Single element in ordered array / 1684 Count the number of consistent strings
Financial judgment questions
Thread forced join, thread forced join application scenarios
磁盘的基本知识和基本命令