码迷,mamicode.com
首页 >  
搜索关键字:step return    ( 64763个结果
Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-05-10 01:09:28    阅读次数:325
cout顺序,i++和++i
先看下以下代码#includeusing namespace std;int x = 1;int f1(){ x = 2; return x;}int f2(){ x = 3; return x;}int main(){ //Test1 cout << x << ...
分类:其他好文   时间:2014-05-10 01:07:57    阅读次数:375
Leetcode | Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t...
分类:其他好文   时间:2014-05-09 19:09:35    阅读次数:318
Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2014-05-09 12:00:21    阅读次数:309
exit和return的区别
1. exit用于结束正在运行的整个程序,它将参数返回给OS,把控制权交给操作系统;而return 是退出当前函数,返回函数值,把控制权交给调用函数。2. exit是系统调用级别,它表示一个进程的结束;而return 是语言级别的,它表示调用堆栈的返回。3. 在main函数结束时,会隐式地调用exi...
分类:其他好文   时间:2014-05-05 11:04:18    阅读次数:302
LeetCode OJ - Binary Tree Level Order Traversal 1 && 2
BFS以及它的扩展,我发现栈是个很好用的数据结构,特别是对于顺序需要颠倒的时候!!!这里有个重要的信息:可以用null来标识一个level的结束!!!下面是AC代码: 1 /** 2 * Given a binary tree, return the bottom-up level ord...
分类:其他好文   时间:2014-05-05 09:46:06    阅读次数:402
[LeetCode] 在一堆字符串中找出包含相同字符的 group的较快方法,题 Anagrams
题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.class Solution {public: vector ...
分类:其他好文   时间:2014-05-04 20:48:08    阅读次数:608
项目中js的工具类
js工具类的功能有: 1、去掉字符串前后空格 2、清空select 3、验证手机号 4、字符串转换int型数字 5、获取checkbox的选中的值 6、去掉左边的空白 7、去掉邮编的空白 源码如下: /** * 去掉字符串前后空格 * * @param str * @returns */ function trim(str){ return str.re...
分类:Web程序   时间:2014-05-04 18:50:51    阅读次数:420
NYOJ 633 幂
#include #include int main() { double k,m; int T; scanf("%d",&T); while(T--) { scanf("%lf%lf",&k,&m); int a=pow(10,log10(m)/k); while(pow(a+1,k)<=m) ++a; printf("%d\n",a); } return 0; }...
分类:其他好文   时间:2014-05-04 18:44:58    阅读次数:296
Linux Booting Process: A step by step tutorial for understanding Linux boot sequence
Oneofthemostremarkableachievementinthehistoryofmankindiscomputers.Anotheramazingfactaboutthisremarkableachievementcalledcomputersisthatitsacollectionofdifferentelectroniccomponents,andtheyworktogetherincoordinationtogiveyouameaningfuloutput.Weinourdaytodayl..
分类:系统相关   时间:2014-05-04 17:05:15    阅读次数:608
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!