摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. If target is not found in th 阅读全文
posted @ 2019-11-04 12:18 CNoodle 阅读(504) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, hei 阅读全文
posted @ 2019-11-02 12:41 CNoodle 阅读(476) 评论(0) 推荐(0) 编辑
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2019-11-01 14:07 CNoodle 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. A subarray is 阅读全文
posted @ 2019-11-01 13:50 CNoodle 阅读(588) 评论(0) 推荐(0) 编辑
摘要: Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest 阅读全文
posted @ 2019-11-01 12:16 CNoodle 阅读(239) 评论(0) 推荐(0) 编辑
摘要: You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval 阅读全文
posted @ 2019-11-01 11:18 CNoodle 阅读(479) 评论(0) 推荐(0) 编辑
摘要: Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals 阅读全文
posted @ 2019-11-01 02:25 CNoodle 阅读(499) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. Exampl 阅读全文
posted @ 2019-11-01 01:35 CNoodle 阅读(611) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals where intervals[i] = [start, end], determine if a person could attend all meetings. Example 1: Input: interva 阅读全文
posted @ 2019-10-31 23:31 CNoodle 阅读(438) 评论(0) 推荐(0) 编辑
摘要: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
posted @ 2019-10-30 23:36 CNoodle 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if i 阅读全文
posted @ 2019-10-30 23:17 CNoodle 阅读(501) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All o 阅读全文
posted @ 2019-10-30 02:15 CNoodle 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati 阅读全文
posted @ 2019-10-30 00:52 CNoodle 阅读(426) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers citations where citations[i] is the number of citations a researcher received for their ith paper, return compute the resea 阅读全文
posted @ 2019-10-29 01:56 CNoodle 阅读(215) 评论(0) 推荐(0) 编辑
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2019-10-28 23:42 CNoodle 阅读(195) 评论(0) 推荐(0) 编辑
摘要: You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in num 阅读全文
posted @ 2019-10-23 12:36 CNoodle 阅读(434) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this i 阅读全文
posted @ 2019-10-23 02:22 CNoodle 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one repeated number in nu 阅读全文
posted @ 2019-10-23 02:00 CNoodle 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Count the number of prime numbers less than a non-negative number, n. Example 1: Input: n = 10 Output: 4 Explanation: There are 4 prime numbers less t 阅读全文
posted @ 2019-10-22 01:38 CNoodle 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Input: n = 10 Outpu 阅读全文
posted @ 2019-10-21 23:50 CNoodle 阅读(136) 评论(0) 推荐(0) 编辑