Feiyang's Blogs


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

LeetCode 1277. Count Square Submatrices with All Ones

Posted on 2020-05-21 | In Leetcode
Words count in article: 266 | Reading time ≈ 1
题目Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. Example 1: 123456789101112Input: matrix =[ [0,1,1,1], [1 ...
Read more »

LeetCode 230. Kth Smallest Element in a BST

Posted on 2020-05-21 | In Leetcode
Words count in article: 255 | Reading time ≈ 1
题目Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Example 1: 1234567Input: root = [3,1,4,null,2], k = ...
Read more »

LeetCode 901. Online Stock Span

Posted on 2020-05-19 | In Leetcode
Words count in article: 424 | Reading time ≈ 2
题目Write a class StockSpanner which collects daily price quotes for some stock, and returns the span of that stock’s price for the current day. The spa ...
Read more »

LeetCode 567. Permutation in String

Posted on 2020-05-18 | In Leetcode
Words count in article: 171 | Reading time ≈ 1
题目Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string’s permuta ...
Read more »

LeetCode 438. Find All Anagrams in a String

Posted on 2020-05-17 | In Leetcode
Words count in article: 254 | Reading time ≈ 1
题目Given a string s and a non-empty string p, find all the start indices of p‘s anagrams in s. Strings consists of lowercase English letters only and t ...
Read more »

LeetCode 328. Odd Even Linked List

Posted on 2020-05-16 | In Leetcode
Words count in article: 243 | Reading time ≈ 1
题目Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not t ...
Read more »

LeetCode 918. Maximum Sum Circular Subarray

Posted on 2020-05-15 | In Leetcode
Words count in article: 423 | Reading time ≈ 2
题目Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray of C. Here, a circular array means the ...
Read more »

LeetCode 208. Implement Trie (Prefix Tree)

Posted on 2020-05-14 | In Leetcode
Words count in article: 241 | Reading time ≈ 1
题目Implement a trie with insert, search, and startsWith methods. Example: 12345678Trie trie = new Trie();trie.insert("apple");trie.search(&qu ...
Read more »

LeetCode 402. Remove K Digits

Posted on 2020-05-13 | In Leetcode
Words count in article: 217 | Reading time ≈ 1
题目Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: Th ...
Read more »

LeetCode 540. Single Element in a Sorted Array

Posted on 2020-05-12 | In Leetcode
Words count in article: 194 | Reading time ≈ 1
题目You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly onc ...
Read more »
1…101112…17
Feiyang Chen

Feiyang Chen

170 posts
7 categories
16 tags
RSS
GitHub E-Mail
Friends' Links
  • asdfv1929's Home
© 2020 Feiyang Chen | Site words total count: 92.1k