摘要:
Game of Life According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathem 阅读全文
摘要:
Ugly Number II Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Inpu 阅读全文
摘要:
H-Index II Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to comput 阅读全文
摘要:
Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find 阅读全文
摘要:
Search a 2D Matrix II Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in 阅读全文
摘要:
Sliding Window Maximum Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You 阅读全文
摘要:
Product of Array Except Self Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all 阅读全文
摘要:
在VSCode中写python时,import numpy和matplotlib总是报错找不到模块,用conda list和pip list看到都安装了numpy,前后折腾了很久遇到了好几个问题: 无法从PIL中导入Image 无法导入numpy.multiarray 无法找到numpy 前后尝试的 阅读全文
摘要:
Lowest Common Ancestor of a Binary Tree Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the de 阅读全文
摘要:
Kth Smallest Element in a BST Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Example 1: Input: root 阅读全文