【LeetCode】字首樹 trie(共14題)
【208】Implement Trie (Prefix Tree)
【211】Add and Search Word - Data structure design
【212】Word Search II
【336】Palindrome Pairs
【421】Maximum XOR of Two Numbers in an Array
【425】Word Squares
【472】Concatenated Words
【642】Design Search Autocomplete System
【648】Replace Words
【676】Implement Magic Dictionary
【677】Map Sum Pairs
【692】Top K Frequent Words
【720】Longest Word in Dictionary
【745】Prefix and Suffix Search
相關推薦
【LeetCode】字首樹 trie(共14題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【208】Implement Trie (Prefix Tree) 【211】Add and Search Word - Data structure design
【LeetCode】深搜DFS(共85題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【98】Validate Binary Search Tree 【99】Recover Binary Search Tree 【100】Same Tr
【LeetCode】圖論 graph(共20題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【133】Clone Graph 【207】Course Schedule 【210】Course Schedule II 【261】G
【LeetCode】回溯法 backtracking(共39題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【10】Regular Expression Matching 【17】Letter Combinations of a Phone Number 【
【LeetCode】1. Two Sum(兩數之和)-C++實現的兩種方法
本題是一下公司的面試題: 問題描述: 問題求解: 使用無序容器unorder_map實現: #include <iostream> #include <vector> #include <cassert> #inclu
【leetcode】415. 字串相加(大整數相加)
#include<iostream> #include<string> #include<vector> using namespace std; string Add(string num1, string num2) { //保證a永遠是最長的那個字串
【LeetCode】樹(共94題)
【94】Binary Tree Inorder Traversal 【95】Unique Binary Search Trees II 【96】Unique Binary Search Trees 【98】Validate Binary Search Tree&nbs
【LeetCode】線段樹 segment-tree(共9題)+ 樹狀陣列 binary-indexed-tree(共5題)
第一部分---線段樹:https://leetcode.com/tag/segment-tree/ p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【218】The Skyline Problem&n
【LeetCode】雜湊表 hashmap(共88題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【1】Two Sum 【3】Longest Substring Without Repeating Characters 【18】4Sum
【LeetCode】棧 stack(共40題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【20】Valid Parentheses 【42】Trapping Rain Water 【71】Simplify Path 【84】
【LeetCode】佇列 queue(共8題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【346】Moving Average from Data Stream 【353】Design Snake Game 【363】Max Sum of
【LeetCode】位運算 bit manipulation(共32題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【78】Subsets 【136】Single Number 【137】Single Number II 【169】Majority E
【LeetCode】設計題 design(共38題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【146】LRU Cache 【155】Min Stack 【170】Two Sum III - Data structure design 
【LeetCode】貪心 greedy(共38題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【44】Wildcard Matching 【45】Jump Game II 【55】Jump Game 【122】Best Time
【LeetCode】連結串列 linked list(共34題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【2】Add Two Numbers 【19】Remove Nth Node From End of List (2018年10月30日
【LeetCode】堆 heap(共31題)
【23】 Merge k Sorted Lists 【215】 Kth Largest Element in an Array (無序陣列中最小/大的K個數) 給了一個無序陣列,可能有重複數字,找到第 k 個最大的元素並且返回這個元素值。 題解:直接用直接用個堆儲存陣列中最大的 K 個數。時間複雜度是
【LeetCode】排序 sort(共20題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【56】Merge Intervals 【57】Insert Interval 【75】Sort Colors 【147】Inserti
【LeetCode】數學(共106題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【2】Add Two Numbers 【7】Reverse Integer 【8】String to Integer (atoi) 【9
【LeetCode】字串 string(共112題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【3】Longest Substring Without Repeating Characters 【5】Longest Palindromic Substring
【LeetCode】並查集 union-find(共16題)
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica } 【128】Longest Consecutive Sequence 【130】Surrounded Regions 【200】Number of Is