原文題目Given head, the head of a linked list, determine if the linked list has a cy...
這題要把給定的二元樹扁平化(flatten),讓它像一個單向鏈表,主要是讓樹的右指標指向鏈表中的下個節點,左指標設為成null,這個“鏈表”須遵依照原來樹的先序...
原文題目
You are given an n x n 2D matrix representing an image, rotate the image by...
解題程式碼
var SmallestInfiniteSet = function () {
this.minHeap = new MinPriorityQu...
🟨編輯距離
本題取自 Leetcode 72. Edit Distance
題目
Given two strings word1 and word2, retu...
Given an integer array nums, return the number of subarrays filled with 0.
A sub...