嘿!各位工程師朋友們,今天我們來聊聊一個相當經典的 Leetcode 題目,叫做「Longest Substring Without Repeating Ch...
探索 Python 的 collections 模組 在 Python 中,collections 模組提供了一組高效的資料結構,這些資料結構擴展了內建類別如...
(o´▽`o)ノ嗨,我是wec,今天是Day 3。 🔎 題目難度與描述 難度:EASY 題目描述: 給定一個整數數組 nums 和一個目標值 target,請在...
今天來看的是 Leetcode 的第一題,編號為 1 的 Two Sum。 問題描述 給定一個整數數組 nums 和一個整數 target,請你在該數組中找出和...
何謂動態規劃 實際上,與其說動態規劃是一個演算法,不如說其描述的是「一群演算法」背後共通的拆解邏輯更為恰當。動態規劃的核心概念分為兩個部分: 將複雜的母問題...
為什麼學習演算法? 第一次接觸 Leetcode 時,看到題目時直接傻住,因為題目都是英文,光是理解題意就讓我非常頭疼。那時,我發現自己的英文能力不足,甚至無...
本文大綱 引言 LeetCode 介紹 Python 複習 list(列表)與string(字串)的切片 generator 與 list comprehe...
Neetcode 150:從 Arrays & Hashing 開始 Neetcode 150 將 Leetcode 上的 150 個問題分為 18 個...
在軟體工程師的面試中,Coding 面試是不可或缺的一環。為了有效準備這類面試,Leetcode 這樣的教學網站成為許多人的首選。你可以使用熟悉的編程語言,如...
題目 1367. Linked List in Binary Tree難度: 中等偏難 題意 給定一串連鏈接head及一二元樹root,求head是否存在於二元...
Given the head of a singly linked list, reverse the list, and return the revers...
Given the head of a singly linked list and two integers left and right where le...
Given an integer array nums of length n where all the integers of nums are in t...
題目 2028. Find Missing Observations難度: 中等但異常簡單 題意 有m+n個六面骰子,給定長度m的整數陣列rolls,代表前m個...
題目 1945. Sum of Digits of String After Convert難度: 簡單 題意 給定一字串s與整數k將字串s中的字元按照字母序轉...
題目: 1894. Find the Student that Will Replace the Chalk題意:給定一個整數陣列chalk,以及一個整數k現場...
HardRelated Topics: Graph / Heap (Priority Queue) / Shortest PathLeetCode Sourc...
MediumRelated Topics: Hash Table / Depth-First Search / Union Find / GraphLeetC...
MediumRelated Topics: Array / Depth-First Search / Breadth-First Search / Union...
EasyRelated Topics: Stack / Tree / Depth-First SearchLeetCode Source 解題想法 後序尋訪...
EasyRelated Topics: Stack / Tree / Depth-First Search / Binary TreeLeetCode Sou...
Hard Related Topics: Math / StringLeetCode Source 解題想法 在這個問題中,給定一個代表整數的字串 n,我們...
MediumRelated Topics: Math / String / SimulationLeetCode Source 解題想法 首先我們要定義分子...
You are visiting a farm that has a single row of fruit trees arranged from left...
EasyRelated Topics: Bit ManipulationLeetCode Source 解題想法 十進位數字轉成二進制 之後將1轉成0 將0...
HardRelated Topics: String / Dynamic ProgrammingLeetCode Source 解題想法 這道題目是關於計算...
MediumRelated Topics: Array / Math / Dynamic Programming / Prefix Sum / Game Th...
MediumRelated Topics: Math / Dynamic ProgrammingLeetCode Source 解題想法 題目要求我們找到最...
MediumRelated Topics: Hash Table / Math / Dynamic Programming / Heap (Priority...
MediumRelated Topics: Array / Dynamic ProgrammingLeetCode Source 解題想法 暴力解的話,會使...