iT邦幫忙

leetcode相關文章
共有 943 則文章
鐵人賽 Software Development DAY 2

技術 [Day 2] Two Sum:暴力解不難,但善用 dictionary 讓你更輕鬆

講到 LeetCode,大部分人共同的回憶(以及共同的起點)大概就是 two Sum 了吧。這題會給一個陣列以及一個數字,我們要找的,就是陣列中哪兩個數字加起來...

技術 那些刷題背後的事

終於有時間來還債了。如果想知道自己的市場價值,最好的方法就是: 去面試。 蠻多人覺得刷大量題目是很必要的,但我遇到的面試官,大部分更著重在,過程的提問和分析問題...

技術 leetcode with python:404. Sum of Left Leaves

題目: Given the root of a binary tree, return the sum of all left leaves. A lea...

鐵人賽 Software Development DAY 23

技術 [23] 用 python 刷 Leetcode: 290 Word Pattern

因為我對 python 不熟,題目可能會在簡單和中等之間跳來跳去 用 Python3 解 LeetCode 系列,290 Word Pattern,屬於 Eas...

鐵人賽 自我挑戰組 DAY 12

技術 [LeetCode with JavaScript] Day 12: Merge Sorted Array

觀前提醒: 我預設大家已經先思考並分析過題目,沒啥想法才開始 google 找解題靈感。若無,建議每題先花 1~2 顆番茄鐘的時間來分析題目比較好。可參考番...

鐵人賽 自我挑戰組 DAY 23

技術 【第二十三天 - DFS 題目分析】

先簡單回顧一下,今天預計分析的題目: 112. Path Sum 題目連結:https://leetcode.com/problems/path-sum...

技術 leetcode with python:234. Palindrome Linked List

題目: Given the head of a singly linked list, return true if it is a palindrome....

鐵人賽 Software Development DAY 26

技術 Day 26:53. Maximum Subarray (2)

今日題目 題目連結:53. Maximum Subarray 題目主題:Array, Divide and Conquer, Dynamic Programmi...

鐵人賽 自我挑戰組 DAY 16
刷題記錄與人生分享 系列 第 16

技術 DAY16 Merge Two Sorted Lists

題目: https://leetcode.com/problems/merge-two-sorted-lists/合併2個排序好的鏈結串列,按排序大小回傳一個新...

鐵人賽 Software Development DAY 29

技術 [29] 用 python 刷 Leetcode: 404

原始題目 Given the root of a binary tree, return the sum of all left leaves. Example...

技術 Leetcode 270. ( Closest Binary Search Tree Value )

In time, you will call me master -- Star Warshttps://leetcode.com/problems/clos...

鐵人賽 自我挑戰組 DAY 26
Leetcode新手挑戰30天 系列 第 26

技術 #1108 Defanging an IP Address

寫在開頭 今天用Acceptance排序,挑了一個有#Easy,也很前面、答對比例很高的題目,叫"Defanging an IP Address&qu...

技術 我分享一下練習LEETCODE 撞牆期的心得

/練習 Leetcode 還是建議先看題目的解答,//*等待 Leetcode 撞牆期渡過了,再自已想解題的部份 */ version:2022070601 網...

技術 leetcode with python:18. 4Sum

題目: Given an array nums of n integers, return an array of all the unique quadru...

技術 30-Day LeetCode Challenge - Week3

我在Matters上歸納了這週的技巧總結,如果有興趣可以一起研究。我的Matters: 前端野人 1.Product of Array Except S...

技術 [用 Python 解 LeetCode] (005) 189. Rotate Array

題幹懶人包 給一個數組,旋轉數組 K 次,K 非負數,如以下 附註:盡量想越多種解法越好,想到之後可否利用空間複雜度 O(1) 完成 Input: nums =...

技術 [用 Python 解 LeetCode] (003) 80. Remove Duplicates from Sorted Array II

題幹懶人包 給定一個排列好的列表,將它整理成重複項最多出現兩次,比方說以下 [1,1,1,2,2,3] -> [1,1,2,2,3, ...] 最後回傳...

LeetCode Top 100 Liked 系列 第 74

技術 [Day 69] Reverse Linked List II (Medium)

92. Reverse Linked List II Solution 1: Recursive Swap NodeValue class Solution:...

技術 [C#] LeetCode 5. Longest Palindromic Substring

Given a string s, return the longest palindromic substring in s. Example 1: Inpu...

鐵人賽 自我挑戰組 DAY 25
刷題記錄與人生分享 系列 第 25

技術 DAY25 Reverse Linked List

題目: https://leetcode.com/problems/reverse-linked-list/翻轉串結鏈結並回傳。 解題思路: 透過三個指標pos...

鐵人賽 自我挑戰組 DAY 17
LeetCode - 30 Days 系列 第 17

技術 [Leetcode-17/30][Graph] #210 Course Schedule II

#210 Course Schedule II 同步發佈於 Github repo 題目難度:Medium 題目敘述: There are a total...

鐵人賽 自我挑戰組 DAY 20
刷題記錄與人生分享 系列 第 20

技術 DAY20 Maximum Depth of Binary Tree

題目: https://leetcode.com/problems/maximum-depth-of-binary-tree/求一個二元樹最大深度並回傳。 解題...

鐵人賽 自我挑戰組 DAY 7

技術 [LeetCode with JavaScript] Day 7: Count and Say

觀前提醒: 我預設大家已經先思考並分析過題目,沒啥想法才開始 google 找解題靈感。若無,建議每題先花 1~2 顆番茄鐘的時間來分析題目比較好。可參考番...

鐵人賽 影片教學 DAY 1

技術 [Day02] 不重複元素的資料結構 Set

#771 - Jewels and Stones 連結: https://leetcode.com/problems/jewels-and-stones/...

鐵人賽 自我挑戰組 DAY 30

技術 [LeetCode with JavaScript] Day 30: Reverse Linked List

觀前提醒: 我預設大家已經先思考並分析過題目,沒啥想法才開始 google 找解題靈感。若無,建議每題先花 1~2 顆番茄鐘的時間來分析題目比較好。可參考番...

鐵人賽 自我挑戰組 DAY 21

技術 [LeetCode with JavaScript] Day 21: Count Primes

觀前提醒: 我預設大家已經先思考並分析過題目,沒啥想法才開始 google 找解題靈感。若無,建議每題先花 1~2 顆番茄鐘的時間來分析題目比較好。可參考番...

鐵人賽 Software Development DAY 16

技術 Day 16 : Remove Nth Node From End of List

今天直接來看題目的敘述:Given the head of a linked list, remove the nth node from the end of...

鐵人賽 自我挑戰組 DAY 16

技術 Leetcode 挑戰 Day 16 [231. Power of Two]

231. Power of Two 今天我們一起挑戰leetcode第231題Power of Two! 題目 Given an integer n, r...

鐵人賽 自我挑戰組 DAY 22
LeetCode Top 100 Liked 系列 第 22

技術 [Day 22] LRU Cache (Medium)

146. LRU Cache Question Design a data structure that follows the constraints of...

鐵人賽 Software Development DAY 9

技術 Day 9:1046. Last Stone Weight

今日題目 題目連結:1046. Last Stone Weight 題目主題:Array, Heap(Priority Queue) 今天的重點一樣在Heap...