2024 iThome 鐵人賽
Share More Gain More
佛心分享-刷題不只是刷題
選手 27 文章 768
Day 25
2024-10-09
692
0
原文題目Given two strings s and p, return an array of all the start indices of p's a...
🟨最大正方形 本題取自 Leetcode 221. Maximal Square 題目 Given an m x n binary matrix filled...
題目:這題要求我們在給定的一個整數陣列中找到「多數元素」:一個出現次數超過 n/2 次的數字,其中 n 是陣列的長度。根據題意,這個陣列一定有一個多數元素。 解...
Day 24
2024-09-05
682
0
Winter is coming! During the contest, your first job is to design a standard he...
Day 26
2024-10-10
679
0
前言 今天我們來解一題挑戰難度的題目——Longest Valid Parentheses(最長有效括號)。 這道題目真的不簡單,因為它要求我們在一個由括號組...
給定一棵二元搜尋樹,請找出任意兩個節點之間的最小絕對差值。 這道題的特點是利用 BST 的性質:中序遍歷 的結果會是一個遞增的序列。因此,最小差值一定出現在相鄰...