圖解 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...
總結 從過去這 75 題 leetcode 的解題歷程 其實可以發現 解題最重要的一件事是先理解題目 能夠明白題目的結構知道需求 才能找出符合需求的解法 解法也...
Longest Repeating Character Replacement You are given a string s and an integer...
Find Minimum in Rotated Sorted Array Suppose an array of length n sorted in asce...
Tree 資料結構解析 Tree Tree(樹) 是一種非線性階層式排列資料結構,因為具有樹狀結構,看起來像一個倒過來生長的樹。 樹狀結構的基本資料存儲單位是節...
Coin Change You are given an integer array coins representing coins of different...
Sliding-Window 策略講解 Sliding Window 是一種演算法策略,通常用在字串或是陣列資料中。 透過把資料限縮在一定資料範圍之內來達成題目...
Construct Binary Tree from Pre-order and In-order Traversal Given two integer ar...
Kth Smallest Element in a BST Given the root of a binary search tree, and an int...
Reverse Bits Reverse bits of a given 32 bits unsigned integer. Note: Note that...
Encode and Decode Strings Design an algorithm to encode a list of strings to a s...
Valid Anagram Given two strings s and t, return true if t is an anagram of s, an...
Subtree of Another Tree Given the roots of two binary trees root and subRoot, re...
Pacific Atlantic Water Flow There is an m x n rectangular island that borders bo...
Serialize and Deserialize Binary Tree Serialization is the process of converting...
Search in Rotated Sorted Array There is an integer array nums sorted in ascendin...
Palindromic Substrings Given a string s, return the number of palindromic substr...
Merge k Sorted Lists You are given an array of k linked-lists lists, each linked...
Insert Interval You are given an array of non-overlapping intervals intervals wh...
Heap 資料結構簡介 Heap 是一種特別的完全二元樹。樹中的任意節點值與其子代節點值具有一定大小順序關係,這個特性稱作 Heap Property。 其中,...
Find Median from Data Stream The median is the middle value in an ordered intege...
Minimum Window Substring Given two strings s and t of lengths m and n respective...
contain duplicate Problem Description Given an integer array nums, return true i...
Longest Consecutive Sequence Given an unsorted array of integers nums, return th...
Top K Frequent Elements Problem Description Given an integer array nums and an i...
Clone Graph Given a reference of a node in a connected undirected graph. Return...
Non-overlapping Intervals Given an array of intervals intervals where intervals[...
Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST),...