Skip to content

murphywuwu/interview

Repository files navigation

🏃🏃🏃 算法 🏃🏃🏃‍

实践&理论

image

Binary Search(二分查找)

#c5f015 easy

#1589F0 medium

  • 33: search in sorted array
  • 81: search in rotated sorted array ii
  • 153: find minimum in rotated sorted array
  • 162: find peak element
  • 34: find first and last position of element in sorted array
  • 300: longest increasing subsequence

#f03c15 hard

  • 154: find minimum in rotated sorted array ii
  • 315: count of smaller numbers after self
  • 354: russian doll envelopes

Sort

  • 冒泡排序
  • 插入排序
  • 选择排序
  • 归并排序
  • 桶排序
  • 计数排序
  • 基数排序

String

#c5f015 easy

  • 28: Implement strStr()

Array

LinkedList

  • 707: Design Linked List
  • 206: Reverse Linked List
  • 141: Linked List cycle
  • 24: swap Nodes in Pairs

Queue

  • 232: Implement Queue using stacks

Stack

  • 20: valid parentheses
  • 225: Implement Stack using Queue

跳表

  • 实现跳表

Hash Table

  • 实现hash Table

Trie

#1589F0 medium

  • 208: implement trie (prefix tree)
  • 79: word search

#f03c15 hard

  • 212: word search ii

Tree

#c5f015 easy

  • 104: maximum depth of binary tree
  • 111: minimum depth of binary tree
  • 235: lowest common ancestor of a binary search tree
  • 226: invert binary tree
  • 112: path sum

#1589F0 medium

  • 102: binary tree level order traversal
  • 236: lowest common ancestor of a binary tree
  • 98: validate binary search tree
  • 863: all nodes distance k in binary tree

Heap

#c5f015 easy

  • 703: Kth Largest Element in a Stream(求top-K)

#f03c15 hard

  • 4: Median of Two Sorted Arrays(求中位数)
  • 239: Sliding Window Maximum(返回滑动窗口的最大值)
  • 215. Kth Largest Element in an Array

  • 200: number of islands
  • 36. Valid Sudoku

🍻🍻🍻 Daily-Question 🍻🍻🍻

  • 1: 请分别用深度优先思想和广度优先思想实现一个拷贝函数
  • 2: 要求设计 LazyMan 类,实现以下功能
LazyMan('Tony');
// Hi I am Tony

LazyMan('Tony').sleep(10).eat('lunch');
// Hi I am Tony
// 等待了10秒...
// I am eating lunch

LazyMan('Tony').eat('lunch').sleep(10).eat('dinner);
// Hi I am Tony
// I am eating lunch
// 等待了10秒
// I am eating dinner

LazyMan('Tony).eat('lunch').eat('dinner').sleepFirst(5).sleep(10).eat('junk food')
// Hi I am Tony
// 等待了5秒
// I am eating lunch
// I am eating dinner
// 等待了10秒
// I am eating junk food
  • 3: 介绍下Set、Map、WeakSet、WeakMap的区别

📚参考

持续更新...

Releases

No releases published

Packages

No packages published