Giter VIP home page Giter VIP logo

leetcode's Introduction

leetcode

leetcode practice start from 2020 Feb

tree

  1. Maximum Depth of Binary Tree (Easy) #3

  2. Minimum Depth of Binary Tree (Easy) #2

  3. Diameter of Binary Tree (Easy) #1

  4. Path Sum (Easy) #1 depth function

  5. Binary Tree Inorder Traversal (Medium) #-1

  6. Binary Tree Preorder Traversal (Medium) #-1

  7. Binary Tree Postorder Traversal (Medium) #-1

  8. validate binary search tree #1 recursion #-1 inorder

  9. Lowest Common Ancestor of a Binary Search Tree (Easy) #2

  10. Lowest Common Ancestor of a Binary Tree (Medium) #2

  11. Symmetric Tree (Easy) #-1

  12. Invert Binary Tree (Easy) #2

  13. Convert Sorted Array to Binary Search Tree (Easy) 还没做

  14. Convert Sorted List to Binary Search Tree (Medium)

  15. Balanced Binary Tree (Easy)

  16. Kth Smallest Element in a BST (Medium)

  17. Binary Tree Paths

  18. Path Sum III (Easy)

  19. Find Mode in Binary Search Tree (Easy)

  20. Next Greater Element III

  21. Subtree of Another Tree (Easy)

  22. Merge Two Binary Trees (Easy)

  23. Trim a Binary Search Tree (Easy)

  24. Longest Univalue Path (Easy)

tree bfs dfs

  1. Sum of Left Leaves (Easy) #2
  2. Find Bottom Left Tree Value (Easy) #2
  3. Average of Levels in Binary Tree (Easy)
  4. Binary Tree Level Order

link list

  1. Remove Nth Node From End of List (Medium) #0
  2. Merge Two Sorted Lists (Easy) #2
  3. Swap Nodes in Pairs (Medium) #3
  4. Remove Duplicates from Sorted List (Easy)
  5. copy-list-with-random-pointer
  6. Linked List Cycle #2
  7. Intersection of Two Linked Lists (Easy) #2
  8. Reverse Linked List (Easy) #3 while #-1 recursion
  9. Palindrome Linked List (Easy)

backtrace. DFS

  1. generate parentheses #1
  2. helper-gen-add.js
  3. permutations #1
  4. permutations-ii #1
  5. combinations #1
  6. Largest Number
  7. House Robber III (Medium)

剪枝

  1. 数独
  2. N-queens #2

recursion, divide&conquer

  1. pow-x-n #3
  2. majority-element #-1
  3. different-ways-to-add-parentheses #1 interview-find100.js #-1

DP

  1. climbing-stairs #2
  2. triangle #2
  3. Maximum Product Subarray #-1
  4. Paint Fence
  5. Nim Game #1
  6. longest-increasing-subsequence
  7. coin change
  8. Product of Array Except Self
  9. Min Cost Climbing Stairs #2

greedy

  1. buy sell stocks

二分查找

  1. Sqrt(x) #2

https://www.beyond3d.com/content/articles/8/ 278. First Bad Version #2 704. Binary Search #3

hash

  1. Two Sum #3
  2. Isomorphic Strings (Easy) string
  3. Longest Palindrome (Easy) string
  4. Valid Anagram (Easy) #2

stack queue

  1. Valid Parentheses (Easy) #3
  2. Decode String #-1
  3. Min Stack (Easy) #1
  4. Implement Stack using Queues (Easy)
  5. Implement Queue using Stacks (Easy) #1

MIS

  1. Daily Temperatures (Medium) #3
  2. Next Greater Element II (Medium) #1
  3. Remove K Digits #2

sliding window

优先队列 实现机制 1.heap 2.BST

  1. Sliding Window Maximum 用deque #1
  2. Kth Largest Element in a Stream 不会考 因为js没有优先队列或者堆

two point

  1. 3-sum #3
  2. Palindromic Substrings (Medium)

string match

  1. implement-str-str (dp) #-1

math / string

  1. add-two-numbers #1

  2. Add Strings #2

  3. Compare Version Numbers #1

  4. Palindrome Number (Easy) #2

  5. Implement Rand10() Using Rand7() #1

  6. reverse-words-in-a-string #0

  7. reverse-words-in-a-string-iii #1

  8. Count Binary Substrings (Easy)

array matrix

  1. Move Zeroes (Easy)
  2. Reshape the Matrix (Easy)
  3. Max Consecutive Ones (Easy)

位运算(bitwise operations)

  1. 1-bit hamming weight 没做
  2. power of two
  3. counting bits

programe

  1. "实例:模板编译"
  2. 就是过滤 HTML 字符串
  3. 国际化处理
  4. reduce #1
  5. throttle, debounce #1
  6. flatten #1
  7. curry #2
  8. bind #1
  9. qsort #1
  10. symbol
  11. myPromise
  12. f(1)(2)(3) //9 #1 f(2)(2)(1) //4 f(2,2,1) //4 f() //0

String:

  1. jsx函数的具体实现 https://gist.github.com/lygaret/a68220defa69174bdec5
  2. 提示字符串格式 YYYY-MM-12
  3. code point超过两个字节的汉字 如何获得码点 var s = "𠮷" 码点是0x20BB7 UTF-16 编码为0xD842 0xDFB7(十进制为55362 57271),需要4个字节储存
  4. let s = '𠮷a' 如何打出这两个字的码点 // 20bb7 // 61
  5. 测试一个字符由两个字节还是由四个字节组成
  6. 字符串码点和字符串相互转化
  7. 2进制 16进制互换

regexp:

  1. 正确返回字符串长度的函数 var s = '𠮷𠮷'; s.length // 4 codePointLength(s) // 2

promise

  1. timeout
  2. 按顺序完成异步操作

function

function m1({x = 0, y = 0} = {}) function m2({x, y} = {x:0, y:0}) m1({x: 3}) m2({x: 3})

  1. strict 模式 严格模式下不能用前缀0表示八进制 严格模式下没有func.arguments:返回调用时函数的参数。 严格模式下没有func.caller:返回调用当前函数的那个函数

  2. 蹦床函数(trampoline)可以将递归执行转为循环执行

  3. 箭头函数this 例子

leetcode's People

Contributors

yanbai avatar yanbai-kooboo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.