码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
Objective-C之定义函数
Demo1.m一个基础的函数定义#import//定义一个返回值为int类型的,名为max的函数。传入的参数为两个int型数据int max(int x,int y){ int z=x>y?x:y; return z;//返回结果}int main(int argc,char * arg...
分类:其他好文   时间:2015-07-08 14:22:28    阅读次数:82
xunsearch使用记录
部署,配置,有时间在记录error = 'not define XUNSEARCH_SDK_PATH'; return $this->error; } include XUNSEARCH_SDK_PATH . 'lib' . DIRE...
分类:其他好文   时间:2015-07-08 14:21:35    阅读次数:117
js 获取某年的某天是第几周
/**2 * 判断年份是否为润年3 *4 * @param {Number} year5 */6 function isLeapYear(year) {7 return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);8 }9 /**1...
分类:Web程序   时间:2015-07-08 14:20:12    阅读次数:129
LeetCode94 BinaryTreeInorderTraversal Java题解(递归 迭代)
题目: Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. 解题: 中序遍历一颗二叉树,如...
分类:编程语言   时间:2015-07-08 13:07:37    阅读次数:141
LeetCode90:Subsets II
Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate...
分类:其他好文   时间:2015-07-08 12:57:07    阅读次数:88
[leetcode]3 Sum closest
问题叙述性说明:Given an array S of n integers, find three integers inS such that the sum is closest to a given number, target. Return the sum of the three in...
分类:其他好文   时间:2015-07-08 12:46:57    阅读次数:134
判断不同浏览器
function isFF(){ //火狐 return window.navigator.userAgent.toLowerCase().indexOf("firefox") >=1 } function isIE(){ //IE return win...
分类:其他好文   时间:2015-07-08 12:28:54    阅读次数:105
leetCode(34):Reverse Words in a String
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C programmers: Try to solve it in-place in...
分类:其他好文   时间:2015-07-08 11:10:35    阅读次数:104
Solution 24: 链表翻转
程序public class ListReverse { public ListNode reverseList(ListNode head) { if (head == null) { return head; } ListNode pre = head; ListNode cur =...
分类:其他好文   时间:2015-07-08 10:53:52    阅读次数:105
leetcode-162-Find Peak Element
Find Peak Element A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index. The ar...
分类:其他好文   时间:2015-07-08 09:40:28    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!