码迷,mamicode.com
首页 >  
搜索关键字:return 设置样式 获取样式    ( 61336个结果
[LeetCode]ZigZag Conversion
Write the code that will take a string and make this conversion given a number of rows: P A H N A P L S I I G Y I R convert("PAYPALISHIRING", 3) should return "PAHNAPLSIIGYIR"....
分类:其他好文   时间:2014-05-15 04:49:04    阅读次数:311
LeetCode-001 Two Sum
LeetCode-001 Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2...
分类:其他好文   时间:2014-05-15 04:34:50    阅读次数:293
向linux内核添加系统调用新老内核比较
2.6内核 1>修改linux-source-2.6.31/kernel/sys.c文件,在文件末尾添加系统响应函数。函数实现如下: asmlinkage int sys_mycall(int number)   {     printk("这是我添加的第一个系统调用");     return number;  } 2>在linux-source-2.6.31...
分类:系统相关   时间:2014-05-15 02:51:56    阅读次数:382
当return遇到finally
http://blog.csdn.net/andymu077/article/details/6649812在try-catch-finally中, 当return遇到finally: 1.在try catch块里return的时候,finally也会被执行。 2.return 语句会把后面的值复制...
分类:其他好文   时间:2014-05-15 01:54:32    阅读次数:354
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-05-14 23:11:14    阅读次数:398
LeetCode--Binary Tree Preorder Traversal
Binary Tree Preorder Traversal  Total Accepted: 18022 Total Submissions: 51784My Submissions Given a binary tree, return the preorder traversal of its nodes' values. For example: Given b...
分类:其他好文   时间:2014-05-14 20:43:22    阅读次数:242
LeetCode 007 Reverse Integer
【题目】 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 【题意】 反转int型整数,输出的也是int型的整数 【思路】 如要考虑两种特殊情况: 1. 类似100这样的整数翻转之后为1 2. 翻转之后的值溢出该如何处理, 本题的测试用例中似乎没有给出溢出的情况 ...
分类:其他好文   时间:2014-05-14 20:41:19    阅读次数:244
java 断点调试
最基本的操作是:  1, 首先在一个java文件中设断点,然后运行,当程序走到断点处就会转到debug视图下,  2, F5键与F6键均为单步调试,F5是step into,也就是进入本行代码中执行,F6是step over,  也就是执行本行代码,跳到下一行,  3,F7是跳出函数 step return  4,F8是执行到最后。 ========================...
分类:编程语言   时间:2014-05-14 20:26:02    阅读次数:975
BigDecimal 加法减法乘法除法
Java的简单类型不能够精确的对浮点数进行运算/***提供精确的加法运算。*@paramv1被加数*@paramv2加数*@return两个参数的和*/publicstaticdoubleadd(doublev1,doublev2){BigDecimalb1=newBigDecimal(Double.toString(v1));BigDecimalb2=newBigDecimal(Double.toString(v2));retu..
分类:其他好文   时间:2014-05-14 18:41:18    阅读次数:241
分析osip的解析报文
staticint_osip_message_parse(osip_message_t*sip,constchar*buf,size_tlength,intsipfrag){inti;constchar*next_header_index;char*tmp;char*beg;tmp=osip_malloc(length+2);if(tmp==NULL){OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_ERROR,NULL,"Couldnotallocatememory..
分类:其他好文   时间:2014-05-14 16:06:25    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!