码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
Pow(x, n)
题目 Implement pow(x, n). 方法 注意Integer.MIN_VALUE值和Integer.MAX_VALUE值。 public double pow(double x, int n) { if (n == 0) { return 1; } if (n == Integer.MIN_VAL...
分类:其他好文   时间:2014-06-19 10:37:27    阅读次数:210
poj 3233 Matrix Power Series(等比矩阵求和)
http://poj.org/problem?id=3233 ps转: 用二分方法求等比数列前n项和:即   原理:   (1)若n==0   (2)若n%2==0     (3)若n%2==1 代码如下: LL sum(LL p,LL n) { if(n==0) return 1; i...
分类:其他好文   时间:2014-06-15 20:01:44    阅读次数:210
数组的指针特性
从一道小题下手(该考点曾被腾讯等大公司作为基础笔试题考过), #include int size(char a[10]) { return sizeof(a); } int main(void) { char a[] = {'C','h','i','n','a','\0'}; char *p = "China"; char *q = a; prin...
分类:其他好文   时间:2014-06-15 19:19:52    阅读次数:221
【Leetcode】Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [3,2,1]. Note: Recursive solut...
分类:其他好文   时间:2014-06-15 19:06:52    阅读次数:166
Win32 Windows编程 二
一、第一个窗口程序 1  入口函数 WinMain 2  窗口处理函数 LRESULT CALLBACK WndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { return DefWindowProc( hWnd, nMsg, wParam, lParam ); } 当窗口处理消息事件时 调用该函数 ...
分类:Windows程序   时间:2014-06-15 17:32:40    阅读次数:305
Search Insert Position
题目 Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates i...
分类:其他好文   时间:2014-06-15 17:27:16    阅读次数:251
JDK1.6集合框架bug:c.toArray might (incorrectly) not return Object[] (see 6260652)
最近在看JDK的源码:...
分类:其他好文   时间:2014-06-15 17:12:15    阅读次数:221
leetcode -day28 Unique Binary Search Trees I II
1、 ?? Unique Binary Search Trees II Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 uni...
分类:其他好文   时间:2014-06-15 09:09:00    阅读次数:256
JavaScript-4.1-简单的表单操作,函数使用方法---ShinePans
4.1 确认表单必填项目完整性 function check_submit(){ if($("tex_user_name").value=="") {alert("请输入用户名");return (false);} if($("txt_user_pass").value=="") {alert("请输入密码");return (false);} if($...
分类:编程语言   时间:2014-06-15 08:50:23    阅读次数:272
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-negative. 方法 将num1与0-9相乘的结果存...
分类:其他好文   时间:2014-06-14 06:08:30    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!