- 博客(14)
- 资源 (2)
- 问答 (4)
- 收藏
- 关注
原创 152. Maximum Product Subarray (受CSDN限制,本文为22号发表,但实际上是1月早写好的)
题目Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the
2018-01-22 15:58:22 417
原创 239. Sliding Window Maximum (受CSDN限制,本文为22号发表,但实际上是1月早写好的)
题目Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sl
2018-01-22 15:58:07 266
原创 121. Best Time to Buy and Sell Stock (受CSDN限制,本文为22号发表,但实际上是1月早写好的)
题目Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the
2018-01-22 15:57:26 328
原创 457. Circular Array Loop
题目You are given an array of positive and negative integers. If a number n at an index is positive, then move forward n steps. Conversely, if it's negative (-n), move backward n steps. Assume the
2018-01-13 20:12:05 297 1
原创 493. Reverse Pairs
题目Given an array nums, we call (i, j) an important reverse pair if i and nums[i] > 2*nums[j].You need to return the number of important reverse pairs in the given array.Example1:Input
2018-01-13 17:40:59 254
原创 315. Count of Smaller Numbers After Self
题目You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i].
2018-01-13 17:25:08 181
原创 215. Kth Largest Element in an Array
题目Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, retu
2018-01-13 16:29:54 186
原创 130. Surrounded Regions
题目Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For exam
2018-01-13 14:59:33 167
原创 120. Triangle
题目Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,
2018-01-13 14:51:23 243
原创 150. Evaluate Reverse Polish Notation
题目Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2
2018-01-13 14:48:52 167
原创 4. Median of Two Sorted Arrays
题目There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. Example 1:nums1 = [1, 3]nums2 = [2]The median is 2.0Example 2
2018-01-13 14:36:04 183
原创 338. Counting Bits
题目Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For
2018-01-13 14:28:59 243
原创 62. Unique Paths
题目A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to re
2018-01-13 14:23:06 243
原创 星尘计算器开发日志
我是初三的时候开始接触编程的。第一次接触的语言是Mobile Basic 高一的时候开始接触Java ME的编程,便产生了写一个计算器的想法,主要是因为自己对计算器的兴趣、热情和了解,同时在当时的Java ME平台上没有好用的计算器。当时每周回家只有几个小时的电脑时间,甚至有时只能用手机写代码,在学校的时候经常拿出本子手写代码,作为一种放松方式。这是一个缓慢艰难但有趣的过程,并且我也享受其中。于是...
2016-05-29 11:04:02 2556 2
android button字体大小根据宽度动态适配
2016-05-10
android 画一对漂亮的括号
2016-02-28
c/c++ Carbon/Carbon.h
2015-11-01
安卓自己的程序设置开机启动 但很抱歉 已停止运行 怎么办?谢谢
2015-10-14
TA创建的收藏夹 TA关注的收藏夹
TA关注的人