码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
Divide Two Integers
用减法可能会超时,但可以用二分 class Solution { public:     int divide(int d1, int d2) {//       d1/d2         if(d1==0)             return 0;         if(d2==1)             return d1;         if(d2==-1)    ...
分类:其他好文   时间:2014-06-29 07:22:02    阅读次数:208
Swift中文教程(六)--枚举和结构
原文:Swift中文教程(六)--枚举和结构Enumerations枚举使用enum来创建一个枚举。跟Classes(类)和其他类型的命名方式一样,枚举也可以有Method(方法)。 1 enum Rank: Int { 2 case Ace = 1 3 case Two, Three, Four,...
分类:其他好文   时间:2014-06-11 23:21:03    阅读次数:395
leetcode--Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def...
分类:其他好文   时间:2014-06-11 22:56:31    阅读次数:257
linux socket中的SO_REUSEADDR
Welcome to the wonderful world of portability... or rather the lack of it. Before we start analyzing these two options in detail and take a deeper loo...
分类:系统相关   时间:2014-06-11 22:05:34    阅读次数:407
javascript块级作用域
在c/java中,拥有块级作用域的概念,大括号内就是一个块级作用域,在块级作用域内声明的变量,块以外不可见。C语音的块级作用域示例如下:int one = 1,two = 2;if(one < two){ int temp = 0; temp = one; one = two; ...
分类:编程语言   时间:2014-06-11 12:33:38    阅读次数:258
LeetCode:Divide Two Integers
Divide two integers without using multiplication, division and mod operator. 其实刚开始看到这道题的时候,感觉应该是略简单。但真正开始写的时候发现了很多错误。 最开始的想法就是divisor一个一个加上去直到大于divide...
分类:其他好文   时间:2014-06-11 12:17:22    阅读次数:274
[leetcode]Edit Distance @ Python
原题地址:https://oj.leetcode.com/problems/edit-distance/题意:Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2....
分类:编程语言   时间:2014-06-11 08:58:49    阅读次数:293
User-Added Coordinate Systems in SimMechanics for unsupported Gear constraints
CAD Software RequirementsThis CAD assembly can be opened in SolidWorks? 2007 and later versions.Assembly and Exported XML FileIn this assembly, two ge...
分类:其他好文   时间:2014-06-11 08:17:18    阅读次数:1800
《深入理解计算机系统》(1)
typedef unsigned char* byte_pointer; void show_bytes(byte_pointer start, int len) { for (int i = 0; i { printf("%2x", start[i]); } cout } int _tmain(int argc, _TCHAR* argv[]) { char* b...
分类:其他好文   时间:2014-06-07 16:22:02    阅读次数:312
atitit.404错误的排查流程总结
atitit.404错误的排查流程总结 #----------jsp  head  errorPage="" del zeu ok le. #------resin 服务器配置问题。俩个应用配置到了同样的的文件夹.. paip.404err two app cfg  one same dir /  cant access /app1   only can acces...
分类:其他好文   时间:2014-06-07 12:16:37    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!