Feiyang's Blogs


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

LeetCode 75. Sort Colors

Posted on 2020-06-11 | In Leetcode
Words count in article: 226 | Reading time ≈ 1
题目Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the ...
Read more »

LeetCode 35. Search Insert Position

Posted on 2020-06-10 | In Leetcode
Words count in article: 132 | Reading time ≈ 1
题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in ...
Read more »

LeetCode 392. Is Subsequence

Posted on 2020-06-09 | In Leetcode
Words count in article: 219 | Reading time ≈ 1
题目Given a string s and a string t, check if s is subsequence of t. A subsequence of a string is a new string which is formed from the original string ...
Read more »

LeetCode 231. Power of Two

Posted on 2020-06-08 | In Leetcode
Words count in article: 139 | Reading time ≈ 1
题目Given an integer, write a function to determine if it is a power of two. Example 1: 123Input: 1Output: true Explanation: 20 = 1 Example 2: 123Input ...
Read more »

LeetCode 518. Coin Change 2

Posted on 2020-06-07 | In Leetcode
Words count in article: 189 | Reading time ≈ 1
题目You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that ...
Read more »

LeetCode 406. Queue Reconstruction by Height

Posted on 2020-06-06 | In Leetcode
Words count in article: 142 | Reading time ≈ 1
题目Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pe ...
Read more »

LeetCode 528. Random Pick with Weight

Posted on 2020-06-06 | In Leetcode
Words count in article: 238 | Reading time ≈ 1
题目Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in propo ...
Read more »

LeetCode 344. Reverse String

Posted on 2020-06-04 | In Leetcode
Words count in article: 205 | Reading time ≈ 1
题目Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, ...
Read more »

LeetCode 1029. Two City Scheduling

Posted on 2020-06-03 | In Leetcode
Words count in article: 231 | Reading time ≈ 1
题目There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th ...
Read more »

LeetCode 237. Delete Node in a Linked List

Posted on 2020-06-02 | In Leetcode
Words count in article: 199 | Reading time ≈ 1
题目Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Example 1: 123Input: head = [4,5,1,9], ...
Read more »
1…8910…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