原创 Leetcode 3. Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb”

原创 Leetcode 208. Implement Trie (Prefix Tree)

Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert(“apple”)

原创 Leetcode backtracking Top interview Question 7道題總結

本篇文章是對leetcode tree和Top Interview Questions標籤下7道backtracking類型題目的總結 Leetcode 46. Permuation 求一個數組的排列,不斷加入新的元素遞歸,遞歸結

原创 Leetcode 212. Word Search II

Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructe

原创 Leetcode tree Top Interview Questions 12道題總結

本篇文章是對leetcode tree和Top Interview Questions標籤下12道tree類型題目的總結 Leetcode 104. Maximum Depth of Binary Tree 此題需要求一顆二叉樹的

原创 Leetcode 329. Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to fou

原创 Leetcode 230. Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assu

原创 Leetcode 94. Binary Tree Inorder Traversal +

本篇主要記錄兩個算法代碼 中序非遞歸算法 class Solution { public: vector<int> inorderTraversal(TreeNode* root) { vector<int

原创 leetcode weekly test 146

5130. Number of Equivalent Domino Pairs Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j]

原创 leetcode 42. Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much wate

原创 leetcode 41. First Missing Positive

Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Ex

原创 事件驅動模型

https://blog.csdn.net/qq_34173549/article/details/80212101 開個坑

原创 前綴樹

https://www.cnblogs.com/luosongchao/p/3239521.html https://blog.csdn.net/u013949069/article/details/78056102 開個坑,之後

原创 leetcode Weekly Contest 144

rank:1313 / 3582 pass: 3/4 1108. Defanging an IP Address Given a valid (IPv4) IP address, return a defanged version

原创 leetcode 15. 3Sum

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique trip