Feiyang's Blogs


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

LeetCode 733. Flood Fill

Posted on 2020-05-11 | In Leetcode
Words count in article: 375 | Reading time ≈ 2
题目An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr ...
Read more »

LeetCode 997. Find the Town Judge

Posted on 2020-05-10 | In Leetcode
Words count in article: 288 | Reading time ≈ 1
题目In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is secretly the town judge. If the town judge exists, ...
Read more »

LeetCode 367. Valid Perfect Square

Posted on 2020-05-09 | In Leetcode
Words count in article: 114 | Reading time ≈ 1
题目Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library funct ...
Read more »

LeetCode 1232. Check If It Is a Straight Line

Posted on 2020-05-08 | In Leetcode
Words count in article: 182 | Reading time ≈ 1
题目You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straigh ...
Read more »

LeetCode 993. Cousins in Binary Tree

Posted on 2020-05-07 | In Leetcode
Words count in article: 319 | Reading time ≈ 1
题目In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they ha ...
Read more »

LeetCode 169. Majority Element

Posted on 2020-05-06 | In Leetcode
Words count in article: 131 | Reading time ≈ 1
题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that t ...
Read more »

LeetCode 387. First Unique Character in a String

Posted on 2020-05-05 | In Leetcode
Words count in article: 101 | Reading time ≈ 1
题目Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1. Examples: 12345s = "leetcod ...
Read more »

LeetCode 476. Number Complement

Posted on 2020-05-04 | In Leetcode
Words count in article: 169 | Reading time ≈ 1
题目Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Example 1: 123Inpu ...
Read more »

LeetCode 383. Ransom Note

Posted on 2020-05-03 | In Leetcode
Words count in article: 164 | Reading time ≈ 1
题目Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ra ...
Read more »

LeetCode 771. Jewels and Stones

Posted on 2020-05-03 | In Leetcode
Words count in article: 167 | Reading time ≈ 1
题目You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of s ...
Read more »
1…111213…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