这道题要求的一个min和一个max,只是这个min所在的位置要在max所在位置的左边。有一种做法是采用蛮力算法,也就是通过从左往右遍历,把每一个元素都当做min,然后再在这个元素的右边找一个最大值,这样得到一个profit,最后求得所有情况中profit的最大值即刻。但是这种做法的时间复杂度是O(n...
分类:
其他好文 时间:
2014-05-01 10:17:20
阅读次数:
287
Designing Your App’s ProductsAproductis
something you want to sell in your app’s store. You create and configure
products in iTunes Connect, and your ...
分类:
移动开发 时间:
2014-05-01 06:25:43
阅读次数:
655
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
398
1、
??
String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:
其他好文 时间:
2014-04-29 13:22:22
阅读次数:
341
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309