Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-07-09 23:32:44
阅读次数:
276
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 fol...
分类:
其他好文 时间:
2014-07-09 23:00:38
阅读次数:
208
Problem Description:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
0? Find all unique triplets in the array which gives the sum of zero.
Note:
El...
分类:
其他好文 时间:
2014-07-08 18:31:01
阅读次数:
159
Who's in the Middle
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 31149
Accepted: 18073
Description
FJ is surveying his herd to find the most average cow...
分类:
其他好文 时间:
2014-07-08 13:30:10
阅读次数:
144
Interesting enough to find out the Reader function in Safari is actually Javascript and there are many interesting stuff from the 2000 line code:
* 5 main parts in the file:
* 1. define const
* 2...
分类:
其他好文 时间:
2014-07-08 13:11:46
阅读次数:
469
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
分类:
其他好文 时间:
2014-07-08 00:41:49
阅读次数:
235
Implement an algorithm to find the kth to last element of a singly linked list.Classical "Runner" Technique of linkedlist/*Use two pointers, forward o...
分类:
其他好文 时间:
2014-07-08 00:37:17
阅读次数:
315
Find the Marble
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Alice and Bob are playing a game. This game is played with several identical pots and one marble. When the game starts, Alice...
分类:
其他好文 时间:
2014-07-06 11:35:34
阅读次数:
133
多进程编程
多进程编程包括如下内容:
复制进程影映像的fork系统调用和替换进程映像的exec系列系统调用。
僵尸进程以及如何避免僵尸进程
进程间通信(Inter-Process Communication,IPC)最简单的方式:管道
3种进程间通信方式:信号量,消息队列和共享内存
fork系统调用
#inclu...
分类:
系统相关 时间:
2014-07-06 08:09:00
阅读次数:
329
There are two sorted arrays A and B of size m and n respectively.
Find the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n)).
有两个已排序的数组A和B,大小为m 和 n。
找出两数组的中...
分类:
其他好文 时间:
2014-07-05 22:54:17
阅读次数:
244