MediumRelated Topics: Array / BacktrackingLeetCode Source
解題想法
首先透過 sort 把 can...
Merge Intervals(合併區間)是一種處理重疊區間的解題技巧。在大部分與Merge Intervals的問題中,題目可能會要求以下作兩種處理:
需要...
145. Binary Tree Postorder Traversal
tags: Easy、Tree
Given the root of a binary...
題目
874. Walking Robot Simulation難度: 中間偏易
題意
有一機器人在2D XY平面上行走。初始座標為[0, 0],朝向北方。給定...
226. Invert Binary Tree
tags: Easy、Tree
Given the root of a binary tree, invert...
DAY 29 試題
問題描述
給定一個 n x n 的二維矩陣,代表一張圖片。請將圖片「順時針旋轉 90 度」。旋轉需要在原地進行,也就是說,必須直接修改輸入...