Mad Thinking, Shit Talking.
About
Home
LC-MindMap
LeetCode
  • Stack

    Nov 16, 2020

    Stack Overview Implementation Stack Implement Stack Implement Stack using Queues 不用每次都来回倒,可以把一部分先放在暂存的里面的,然后判断是否为空,再将另一个stack里的元素倒进来。 Implement a stack by two queues Monotonic Stack

    Read More
  • Tree

    Nov 16, 2020

    Tree Overview Tree类型问题还是比较有普遍性的,没有太多需要奇技淫巧的地方,一般可以这么思考 考虑DFS还是BFS 如果是DFS的话是从上往下还是下往上

    Read More
  • Arrays Overview

    Oct 4, 2020

    Arrays Overview Sum 主要就是Hash table 和 two pointers的应用。一句话概括就是准确值用HashMap,接近值就是先sort 再 Two Points Two Sum Two Sum II Two Sum III Two Sum IV Two

    Read More
  • LC MindMap

    Oct 4, 2020

    Two Points Related Topics: Linked List Arrays Sliding Window Binary Search

    Read More
  • Linked List

    Oct 3, 2020

    Linked List Overview Fast & Slow Pointers Linked List Cycle Linked List Cycle II 其实不用快慢指针,而用一个hashset的话写法更简单。如果要求O(1)的space complexity 那么只能用快慢指针。 找到相

    Read More
  • Sliding Window

    Oct 3, 2020

    Sliding Window Overview Related Questions Minimum Size Subarray Sum 本题成立的条件是所有的数都是positive Longest Substring Without Repeating Characters Minimum Window Substring Find All Anagrams in a String Substring with Concatenation of All Words Longest Substring with At Most Two Distinct Characters Subarrays with K Different …

    Read More
  • Top K

    Oct 3, 2020

    Top K Overview 主要的思路是O(nlogn)的PriorityQueue / Sort 和 Average O(n)的Quick Select. 还有一个常见的是关于频率,对于Java需要注意一

    Read More
  • Backtracking / BFS / DFS

    Jun 18, 2020

    Overview DFS/BFS/Backtracking 作为一种暴力搜索手段,时常作为DP找不到公式的下位替代,主要难点在于如何优化。 Subsets & Permutations & Combinations subsets subsets II permutations permutations II Combinations Next Permutation* 在解决permutation问

    Read More
  • Binary Search

    Jun 18, 2020

    Binary Search Overview Related Questions Binary Search Search Insert Position Search in Rotated Sorted Array Search in Rotated Sorted Array II Find Minimum in Rotated Sorted Array Find Minimum in Rotated Sorted Array II Search a 2D Matrix Search a 2D Matrix II Find Peak Element 第一次做的时候没发现array本身是没有排序的。

    Read More
  • Trie

    Jun 18, 2020

    Trie The word Trie comes from retrieve Trie 直接实现 利用Trie的前缀特性 矩阵里,字符串的每个字符,DFS Implement Trie (Prefix Tree) Add and Search Word - Data structure design Word Break II Word Search II Word Squares Design Search Autocomplete System How to 1 class TrieNode { 2

    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

Xuanhao

Read More

Featured Posts

  • LC MindMap

Recent Posts

  • Stack
  • Tree
  • Arrays Overview
  • LC MindMap
  • Linked List
  • Sliding Window
  • Top K
  • Backtracking / BFS / DFS

Copyright © 2020 MAD THINKING, SHIT TALKING.. All Rights Reserved