码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
Oracle实践--PL/SQL基础之函数
/* 函数:可以有返回值得命名的PL/SQL子程序,必须有返回值 关键字:function return */...
分类:数据库   时间:2014-05-15 14:49:18    阅读次数:359
LeetCode-004 Add Two Numbers
【题目】 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
[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 树 Binary Tree Preorder Traversal
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Binary Tree Preorder Traversal  Total Accepted: 17948 Total Submissions: 51578 Given a binary tree, return the preorder tra...
分类:其他好文   时间:2014-05-15 04:37:26    阅读次数:283
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
leetcode第一刷_Count and Say
水题。 描述的还挺麻烦的,实际上就是纸老虎,用两个string,一个存上一轮的结果,一个用来更新出这一轮的结果,每次扫描上一轮,统计一个字符出现的次数,然后把这个次数和字符加入到这一轮的字符串中就可以了。 class Solution { public: string countAndSay(int n) { if(n == 0) return ""; ...
分类:其他好文   时间:2014-05-15 04:12:07    阅读次数:289
60行R++代码实现Lisp解释器
还没有处理lambda、上下文等,有待完善。 main { for putsl(eval(getsl)) } rstr eval(rstr s) { s=tokenize(s) v=s.split(' ') if v.get(0)!='(' return v.get(0) next=find(v.sub(2))+2 switch v.get(1) case '+' r...
分类:其他好文   时间:2014-05-14 15:32:34    阅读次数:323
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
hdu 最小公倍数
/* * hdu 最小公倍数 * date 2014/5/13 * state AC */ #include using namespace std; int gcd(int x,int y) { while(x!=y) { if(x>y)x=x-y; else y=y-x; } return x; } int main() ...
分类:其他好文   时间:2014-05-14 14:29:59    阅读次数:225
js校验密码强度
网上转载的一段代码,留着以后用,js文件://判断输入密码的类型 function CharMode(iN){ if (iN>=48 && iN =65 && iN =97 && iN >>=1; } return modes; } //返回强度级别 function chec...
分类:Web程序   时间:2014-05-14 13:32:27    阅读次数:387
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!