圖解 blind 75 總綱 本系列文將會呈獻做圖方式解析 blind 75 題目 何為 blind 75 主要是有人在 blind 這個網站從 leetcod...
圖解 blind 75: Array & HashTable 前言 本篇主要是介紹這個類型題目所會用到的演算法及資料結構 以下分別針對 Array 與...
two sum Problem Description Given an array of integers nums and an integer targe...
Sliding-Window 策略講解 Sliding Window 是一種演算法策略,通常用在字串或是陣列資料中。 透過把資料限縮在一定資料範圍之內來達成題目...
Longest Repeating Character Replacement You are given a string s and an integer...
總結 從過去這 75 題 leetcode 的解題歷程 其實可以發現 解題最重要的一件事是先理解題目 能夠明白題目的結構知道需求 才能找出符合需求的解法 解法也...
Find Minimum in Rotated Sorted Array Suppose an array of length n sorted in asce...
Kth Smallest Element in a BST Given the root of a binary search tree, and an int...
Valid Anagram Given two strings s and t, return true if t is an anagram of s, an...
Tree 資料結構解析 Tree Tree(樹) 是一種非線性階層式排列資料結構,因為具有樹狀結構,看起來像一個倒過來生長的樹。 樹狀結構的基本資料存儲單位是節...
Encode and Decode Strings Design an algorithm to encode a list of strings to a s...
Construct Binary Tree from Pre-order and In-order Traversal Given two integer ar...
contain duplicate Problem Description Given an integer array nums, return true i...
Coin Change You are given an integer array coins representing coins of different...
Search in Rotated Sorted Array There is an integer array nums sorted in ascendin...
Heap 資料結構簡介 Heap 是一種特別的完全二元樹。樹中的任意節點值與其子代節點值具有一定大小順序關係,這個特性稱作 Heap Property。 其中,...
Insert Interval You are given an array of non-overlapping intervals intervals wh...
Reverse Bits Reverse bits of a given 32 bits unsigned integer. Note: Note that...
Top K Frequent Elements Problem Description Given an integer array nums and an i...
Serialize and Deserialize Binary Tree Serialization is the process of converting...
Longest Consecutive Sequence Given an unsorted array of integers nums, return th...
Two Pointers 策略 Two Pointer 是一種用來解決問題的演算法策略。 如同其字面上所指,會同時使用兩個指標來對搜尋範圍做限縮。 通常適合用在...
Longest Substring Without Repeating Characters Given a string s, find the length...
Minimum Window Substring Given two strings s and t of lengths m and n respective...
Best Time to Buy and Sell Stock You are given an array prices where prices[i] is...
Product of Array Except Self Problem Description Given an integer array nums, re...
Pacific Atlantic Water Flow There is an m x n rectangular island that borders bo...
Subtree of Another Tree Given the roots of two binary trees root and subRoot, re...
Group Anagrams Problem Description Given an array of strings strs, group the ana...
Find Median from Data Stream The median is the middle value in an ordered intege...