原文題目
You are climbing a staircase. It takes n steps to reach the top.
Each time...
線性排序法
線性排序(Linear sort),指的是時間複雜度為O(n)的排序演算法,之所以時間複雜度能達到線性,是因為這種排序非基於比較的,但它的適用場景也...
原文題目
Given an m x n integer matrix matrix, if an element is 0, set its entire ro...
今天來記錄一下二分法搜尋吧! 雖然這類型相關的題目在還沒正式認識二分法搜尋之前,"盲寫"也解得出來,不過還是做個記錄吧!
Binary S...
226. Invert Binary Tree
tags: Easy、Tree
Given the root of a binary tree, invert...
解題程式碼
var isNStraightHand = function (hand, groupSize) {
const handMap = new M...