Nội dung gần đây của DDuong

  1. DDuong

    thảo luận [Học Tập] Topic thuật toán

    Này là tìm cạnh mà 2 đầu nó có chung 1 root thôi bác :big_smile:
  2. DDuong

    thảo luận [Học Tập] Topic thuật toán

    Dùng Disjoint Set: class Solution: def findRedundantConnection(self, edges): arr = [i for i in range(len(edges))] for a, b in edges: if self.find(arr, a-1, b-1): return [a, b] self.union(arr, a-1, b-1) return "lmao" def...
Quay lại
Lên đầu trang