學妹和我在線索的分析上起了爭執。 「還不能確定那些數字就是指題目編號吧?在那之前我們都是自己選題,也沒什麼問題。」學妹覺得應該恢復自己選題,掌握主動權。 「⋯⋯...
但可惜我怎麼看,門都沒有一絲縫隙。 「學姊,還是老實解題吧。」學妹很快就放棄了等待,回去解題。 我又等了一會兒,等到最後晃動也停止了,才垂頭喪氣的回到學妹身邊。...
HardRelated Topics: Array / DFS / BFS / Matrix / Strongly Connected ComponentLe...
前言 嘿嘿~我們又回來啦!延續上次的 Longest Valid Parentheses 題目,這次我們要換個方式來解決。還記得上次我們用了動態規劃法嗎? 今...
「而且電影裏的駭客的臨場反應可是快而不亂。」我見學妹越來越萎靡不振,有點不忍。「也不用這樣氣餒啦,可以試試開發AI駭客,讓她實現妳的夢想。啊,但目前AI主流是用...
(^-^)ゞ嗨,我是wec,今天是DAY 26。 🔎 題目難度與描述 難度:MEDIUM 題目描述: 給定一個可包含重複數字的整數數組nums,返回這些數字的所...
Description Min Stack Design a stack that supports push, pop, top, and retriev...
「不解題就不能離開的房間」文字旁邊出現了凹陷。 「該不會這不是58,是5日的意思吧?」將之前拿到的線索放置到對應的凹陷處之後,學妹突然說。「所以我們連續5天解開...
Description Binary Tree Inorder Traversal Given the root of a binary tree, ret...
160. Intersection of Two Linked Lists 題目 Given the heads of two singly linked-li...
TypeScript 映射型別進階技巧 🎯 在使用 TypeScript 的過程中,我們經常會遇到需要將一個型別轉換成另一個型別的需求。映射型別(Mapped...
繼第 10 天的「73. Set Matrix Zeroes」,今天來解 287 這題!還沒看過第 10 天或再之前天數的朋友,歡迎也去看看~ 話不多說,我們...
看完上一篇介紹,我們學習到 Two pointers 是 LeetCode 解題的重要關鍵,如果學會了,很多題目都可以迎刃而解,而我們今天要利用 SwiftUI...
題目說明 給定一個字符串,包含大中小括號,其中 思路說明 這題可以用 stack 處理 設定好 左右括號對應的 map 遍歷整個字符串 遇到左括號時,放到...
這幾天我一直在研究 Python 的 collections 模組。裡面的工具非常豐富,但也容易讓人迷失。今天,我們將深入探討一個特別有用的資料結構:Order...
MediumRelated Topics: Hash Table / String / Greedy / Sorting / CountingLeetCode...
為了避免思考疲勞和僵化,我和學妹討論過,不要連續做相同領域的題目。 所以做完陣列之後,選了一題要求回傳List的題目,412. Fizz Buzz要根據索引值來...
https://leetcode.com/problems/two-sum/description/ Two Sum JavaScript 解答...
EasyRelated Topics: Array / Hash Table / SortingLeetCode Source 解題想法 基本上就是判斷說兩...
題目說明 palindromic substring : 回文字串,也就是 reverse 後會與原本字串一樣題目給定一個字串,找出在這個字串中出現的最長回文字...
原文題目 Given an m x n integer matrix matrix, if an element is 0, set its entire ro...
Description Group Anagrams Given an array of strings strs, group theanagrams t...
Description Symmetric Tree Given the root of a binary tree, check whether it i...
第一次參與鐵人賽真是興奮阿! 我原本從事傳統產業,在四年多的日子裡總是覺得很痛苦,這讓我想轉換跑道,挑戰更高的收入、更好的生活! 參賽不只是一種挑戰,更是種激勵...
10. Regular Expression Matching Question Given an input string s and a pattern p...
169. Majority Element 解題程式碼 var majorityElement = function (nums) { let majori...
Given an integer array nums of length n where all the integers of nums are in t...
2705. Compact Object 解題程式碼 var compactObject = function (obj) { if (obj === nu...
完全沒想到啊,講完Linked List 的基本概念跟操作之後,馬上就接著要你自己手刻一個Linked List 出來,不能使用各個程式語言的Library,這...
Given the head of a singly linked list and two integers left and right where le...