Practice_150

@nc150

NeetCode 150

Public team

Community (0)
No community contribution yet

Joined on Oct 10, 2023

  • Plan x Reality # Category Title Note Start Date End Date 1 Bit Manipulation
     Like  Bookmark
  • :::info Select 2 From latest NeetCode :::
     Like  Bookmark
  • ref 1 : Dijkstra::BFS 在 Dijkstra 這個演算法: BFS + priority queue(min heap). 這個概念下,加上 k 這個限制條件 (少於k及紀錄目前節點遇過最少的steps). class Solution: def findCheapestPrice(self, n: int, flights: List[List[int]], src: int, dst: int, k: int) -> int: #Make graph adj_list = {i:[] for i in range(n)} for frm, to, price in flights: adj_list[frm].append((to, price))
     Like  Bookmark
  • 原文 https://leetcode.com/problems/count-good-nodes-in-binary-tree/description/ 題意 計算好節點總數。 What is good node ? 從任意節點到這一個節點,假設任意節點都比節點小或是相等,即為好節點。 變數說明
     Like  Bookmark
  • Basic https://www.digitalocean.com/community/tutorials/height-of-a-binary-tree-in-c-plus-plus Code it up Leetcode https://leetcode.com/Yu_135/
     Like  Bookmark
  • Keywords: Random pointer Method 因為 Random pointer,而需 Two passes 處理。 Q: 那假設沒有 Random pointer,One Pass 可以解決嗎?
     Like  Bookmark