不想做菜鸟的小螃蟹

菜鸟成长记录,欢迎批评指正

【Leetcode】665. Non-decreasing Array(Easy)

1.题目Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-...

2018-04-26 16:17:43

阅读数:50

评论数:0

【Leetcode】661. Image Smoother(Easy)

1.题目Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes th...

2018-04-24 15:49:39

阅读数:31

评论数:0

【Leetcode】657. Judge Route Circle(Easy)

1.题目Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to t...

2018-04-24 14:26:10

阅读数:33

评论数:0

【Leetcode】653. Two Sum IV - Input is a BST(Easy)

1.题目Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given targ...

2018-04-23 10:16:19

阅读数:30

评论数:0

【Leetcode】645. Set Mismatch(Easy)

1.题目The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to anot...

2018-03-29 11:02:49

阅读数:35

评论数:0

【Leetcode】643. Maximum Average Subarray I(Easy)

1.题目Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to outpu...

2018-03-29 10:44:45

阅读数:23

评论数:0

【Leetcode】637. Average of Levels in Binary Tree(Easy)

1.题目Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.Example 1:Input: 3 / \ 9 20 ...

2018-03-29 10:36:09

阅读数:20

评论数:0

【Leetcode】633. Sum of Square Numbers(Easy)

1.题目Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c.翻译:给定一个非负整数 c ,你的任务是判断是否有两个整数 ...

2018-03-28 10:59:22

阅读数:33

评论数:0

【Leetcode】628. Maximum Product of Three Numbers(Easy)

1.题目Given an integer array, find three numbers whose product is maximum and output the maximum product.翻译:给定一个整数序列,找到三个数使得它们的乘积最大,并且输出最大的乘积。Example 1...

2018-03-28 10:50:52

阅读数:27

评论数:0

【Leetcode】627. Swap Salary(Easy)

1.题目Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vic...

2018-03-28 10:44:36

阅读数:54

评论数:0

【Leetcode】620. Not Boring Movies(Easy)

1.题目X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and de...

2018-03-28 10:38:17

阅读数:44

评论数:0

【Leetcode】617. Merge Two Binary Trees(Easy)

1.题目Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others ...

2018-03-28 10:31:48

阅读数:18

评论数:0

【Leetcode】606. Construct String from Binary Tree(Easy)

1.题目You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way.The null node needs to be...

2018-03-27 10:17:45

阅读数:15

评论数:0

【Leetcode】605. Can Place Flowers(Easy)

1.题目Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots -...

2018-03-27 10:10:16

阅读数:36

评论数:0

【Leetcode】596. Classes More Than 5 Students(Easy)

1.题目There is a table courses with columns: student and classPlease list out all classes which have more than or equal to 5 students.For example, the ...

2018-03-23 15:55:52

阅读数:54

评论数:0

【Leetcode】599. Minimum Index Sum of Two Lists(Easy)

1.题目Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.You need ...

2018-03-23 15:50:20

阅读数:29

评论数:0

【Leetcode】595. Big Countries(Easy)

1.题目There is a table World+-----------------+------------+------------+--------------+---------------+ | name | continent | area | ...

2018-03-22 11:20:40

阅读数:34

评论数:0

【Leetcode】598. Range Addition II(Easy)

1.题目Given an m * n matrix M initialized with all 0's and several update operations.Operations are represented by a 2D array, and each operation is re...

2018-03-22 11:03:41

阅读数:23

评论数:0

【Leetcode】594. Longest Harmonious Subsequence (Easy)

1.题目We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given an integer ...

2018-03-21 12:25:19

阅读数:22

评论数:0

【Leetcode】581. Shortest Unsorted Continuous Subarray(Easy)

1.题目Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array wil...

2018-03-20 10:25:56

阅读数:28

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭