class Solution:
def getIntersectionNode(self, headA: ListNode, headB: ListNode)-> ListNode:if headA == None or headB == None:return None
a, b = headA, headB
while(a != b):if a==None:
a = headB
else:
a = a.next
if b==None:
b = headA
else:
b = b.next
return a
class Solution:
def majorityElement(self, nums: List[int])->int:
dic={}for i in nums:if i in dic:
dic[i]+=1else:
dic[i]=1returnmax(dic.keys(), key=lambda x: dic[x])