iT邦幫忙

leetcode相關文章
共有 1110 則文章

技術 Day03 X Leetcode:無重複字元的最長子串 Longest Substring Without Repeating Characters

嘿!各位工程師朋友們,今天我們來聊聊一個相當經典的 Leetcode 題目,叫做「Longest Substring Without Repeating Ch...

正拳的 Leetcode 150 系列 第 4 篇

技術 [Day 4] 善用 Python 的 collections - Counter

探索 Python 的 collections 模組 在 Python 中,collections 模組提供了一組高效的資料結構,這些資料結構擴展了內建類別如...

技術 DAY 3:Two Sum 每個人的easy第一題!

(o´▽`o)ノ嗨,我是wec,今天是Day 3。 🔎 題目難度與描述 難度:EASY 題目描述: 給定一個整數數組 nums 和一個目標值 target,請在...

正拳的 Leetcode 150 系列 第 3 篇

技術 [Day 3] 善用 Python 基本資料結構:dictionary

今天來看的是 Leetcode 的第一題,編號為 1 的 Two Sum。 問題描述 給定一個整數數組 nums 和一個整數 target,請你在該數組中找出和...

技術 Day 02 動態規劃簡介

何謂動態規劃 實際上,與其說動態規劃是一個演算法,不如說其描述的是「一群演算法」背後共通的拆解邏輯更為恰當。動態規劃的核心概念分為兩個部分: 將複雜的母問題...

技術 前言介紹:精進演算法,掌握技術詞 - 兩數之和 Two Sum

為什麼學習演算法? 第一次接觸 Leetcode 時,看到題目時直接傻住,因為題目都是英文,光是理解題意就讓我非常頭疼。那時,我發現自己的英文能力不足,甚至無...

技術 Day 01 引言、刷題實用Python語法整理

本文大綱 引言 LeetCode 介紹 Python 複習 list(列表)與string(字串)的切片 generator 與 list comprehe...

正拳的 Leetcode 150 系列 第 2 篇

技術 [Day 2] 善用 Python 基本資料結構:集合 Set

Neetcode 150:從 Arrays & Hashing 開始 Neetcode 150 將 Leetcode 上的 150 個問題分為 18 個...

正拳的 Leetcode 150 系列 第 1 篇

技術 [Day 1] 刷題從 Neetcode 網站開始

在軟體工程師的面試中,Coding 面試是不可或缺的一環。為了有效準備這類面試,Leetcode 這樣的教學網站成為許多人的首選。你可以使用熟悉的編程語言,如...

技術 [9/7] 樹裡的鏈

題目 1367. Linked List in Binary Tree難度: 中等偏難 題意 給定一串連鏈接head及一二元樹root,求head是否存在於二元...

刷題筆記 系列 第 29 篇

技術 [Day29] Reverse Linked List

Given the head of a singly linked list, reverse the list, and return the revers...

刷題筆記 系列 第 30 篇

技術 [Day30] Reverse Linked List II

Given the head of a singly linked list and two integers left and right where le...

刷題筆記 系列 第 27 篇

技術 [Day27] Find All Duplicates in an Array

Given an integer array nums of length n where all the integers of nums are in t...

技術 [9/5] 今天骰到六

題目 2028. Find Missing Observations難度: 中等但異常簡單 題意 有m+n個六面骰子,給定長度m的整數陣列rolls,代表前m個...

技術 [9/3] 字串換整數

題目 1945. Sum of Digits of String After Convert難度: 簡單 題意 給定一字串s與整數k將字串s中的字元按照字母序轉...

技術 [9/2] 找換粉筆的傢伙

題目: 1894. Find the Student that Will Replace the Chalk題意:給定一個整數陣列chalk,以及一個整數k現場...

8月 LeetCode Daily 見聞錄 系列 第 30 篇

技術 [8/30] 2699. Modify Graph Edge Weights

HardRelated Topics: Graph / Heap (Priority Queue) / Shortest PathLeetCode Sourc...

8月 LeetCode Daily 見聞錄 系列 第 29 篇

技術 [8/29] 947. Most Stones Removed with Same Row or Column

MediumRelated Topics: Hash Table / Depth-First Search / Union Find / GraphLeetC...

8月 LeetCode Daily 見聞錄 系列 第 28 篇

技術 [8/28] 1905. Count Sub Islands

MediumRelated Topics: Array / Depth-First Search / Breadth-First Search / Union...

8月 LeetCode Daily 見聞錄 系列 第 26 篇

技術 [8/26] N-ary Tree Postorder Traversal

EasyRelated Topics: Stack / Tree / Depth-First SearchLeetCode Source 解題想法 後序尋訪...

8月 LeetCode Daily 見聞錄 系列 第 25 篇

技術 [8/25] 145. Binary Tree Postorder Traversal

EasyRelated Topics: Stack / Tree / Depth-First Search / Binary TreeLeetCode Sou...

8月 LeetCode Daily 見聞錄 系列 第 24 篇

技術 [8/24] 564. Find the Closest Palindrome

Hard Related Topics: Math / StringLeetCode Source 解題想法 在這個問題中,給定一個代表整數的字串 n,我們...

8月 LeetCode Daily 見聞錄 系列 第 23 篇

技術 [8/23] 592. Fraction Addition and Subtraction

MediumRelated Topics: Math / String / SimulationLeetCode Source 解題想法 首先我們要定義分子...

刷題筆記 系列 第 10 篇

技術 [Day10] Fruit Into Baskets

You are visiting a farm that has a single row of fruit trees arranged from left...

8月 LeetCode Daily 見聞錄 系列 第 22 篇

技術 [8/22] 476. Number Complement

EasyRelated Topics: Bit ManipulationLeetCode Source 解題想法 十進位數字轉成二進制 之後將1轉成0 將0...

8月 LeetCode Daily 見聞錄 系列 第 21 篇

技術 [8/21] 664. Strange Printer

HardRelated Topics: String / Dynamic ProgrammingLeetCode Source 解題想法 這道題目是關於計算...

8月 LeetCode Daily 見聞錄 系列 第 20 篇

技術 [8/20] 1140. Stone Game II

MediumRelated Topics: Array / Math / Dynamic Programming / Prefix Sum / Game Th...

8月 LeetCode Daily 見聞錄 系列 第 19 篇

技術 [8/19] 650. 2 Keys Keyboard

MediumRelated Topics: Math / Dynamic ProgrammingLeetCode Source 解題想法 題目要求我們找到最...

8月 LeetCode Daily 見聞錄 系列 第 18 篇

技術 [8/18] 264. Ugly Number II

MediumRelated Topics: Hash Table / Math / Dynamic Programming / Heap (Priority...

8月 LeetCode Daily 見聞錄 系列 第 17 篇

技術 [8/17] 1937. Maximum Number of Points with Cost

MediumRelated Topics: Array / Dynamic ProgrammingLeetCode Source 解題想法 暴力解的話,會使...