題目:這題要求我們計算二元樹中任意兩個節點之間的最大距離,這段距離被稱為二元樹的「直徑」。直徑的長度是透過兩個節點間的邊數來衡量的,而不一定需要經過樹根。
解題...
既然是第一天那肯定是從我們的第一題開始做起的啦~
題目
Given an array of integers nums and an integer targ...
Given an unsorted integer array nums. Return the smallest positive integer that...
Given the head of a singly linked list and two integers left and right where le...
今天來記錄一下二分法搜尋吧! 雖然這類型相關的題目在還沒正式認識二分法搜尋之前,"盲寫"也解得出來,不過還是做個記錄吧!
Binary S...
過了一半,該開始挑戰一天寫3題了~
693. Binary Number with Alternating Bits
tags: Easy、Bitwise
G...