Symmetric Tree @ LeetCode (Python)
Surrounded Regions @ LeetCode (Python)

Linked List Cycle @ LeetCode (Python)

kitt posted @ 2014年2月22日 21:53 in LeetCode , 2153 阅读


# class ListNode:
#     def __init__(self, x):
#         self.val = x
# = None

class Solution:
    # @param head, a ListNode
    # @return a boolean
    def hasCycle(self, head):
        fastP = slowP = head
        while fastP != None and != None:
            fastP =
            slowP =
            if fastP == slowP: return True
        return False
AP 10th General Scie 说:
2022年9月17日 13:15

All Andhra Pradesh State Class 10th (SSC) Students can download AP SSC Science model paper 2023 with Answer solutions in Chapter by Chapter for Physical Science, Chemistry, Biological Science and Environmental science for AP SSC Science Model Paper 2023 examination test for Unit Test-1, Unit Test-2, AP 10th General Science Question Paper Unit Test-3, Unit Test-4, and Quarterly, Half Yearly, Pre-Final with Annual final examination tests 2023. The Andhra Pradesh State Board of Secondary Education has published the General Science model paper with study material with practice paper with mock test question bank as AP 10th Biology, PS, Chemistry Model Paper 2023 for all examination tests conducted by BSEAP.

登录 *

loading captcha image...
or Ctrl+Enter