Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2015-04-02 09:03:25
阅读次数:
120
Plus One
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
解题思路:...
分类:
其他好文 时间:
2015-04-02 01:20:13
阅读次数:
152
From browsers to mobile phones, from tablets to tabletops, from industrial automation to the tiniest microcontrollers?—?JavaScript seems to creep into the most unexpected places these days. It’...
分类:
编程语言 时间:
2015-04-01 13:40:28
阅读次数:
189
题目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 stock), d...
分类:
其他好文 时间:
2015-04-01 09:32:47
阅读次数:
115
??
The most common way to initialize flags is to use hexadecimal literals. This is how Microsoft and most C# developers do it:
[Flags]
public enum DaysOfTheWeek
{
None = 0,
Sunday = 0x01,
Monday...
分类:
编程语言 时间:
2015-03-31 20:12:19
阅读次数:
123
Djianggo 在win7下 安装会报错Traceback (most recent call last):File "setup.py", line 4, in from setuptools import setup, find_packagesImportError: No module ....
Key Design Concepts
关键的设计概念
Managing complexity is the most important technical topic in software development.
管理的复杂性是软件开发中最重要的技术课题。
The goal of all software-design techniques is to break acomplica...
分类:
其他好文 时间:
2015-03-31 18:02:18
阅读次数:
194
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5,
and A is now [1,1,...
分类:
其他好文 时间:
2015-03-31 10:55:22
阅读次数:
98
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most k transactions.
Note:
You may no...
分类:
编程语言 时间:
2015-03-31 10:52:14
阅读次数:
193
1317. Sudoku
Constraints
Time Limit: 10 secs, Memory Limit: 32 MB
Description
Sudoku is a placement puzzle. The goal is to enter a symbol in each cell of a grid, most frequently a 9 ...
分类:
其他好文 时间:
2015-03-31 09:03:13
阅读次数:
209