码迷,mamicode.com
首页 >  
搜索关键字:地址    ( 121505个结果
Leetcode#114 Flatten Binary Tree to Linked List
原题地址中序遍历二叉树,递归展开。别忘了将left设为NULL,如果忘掉的话可能报Runtime Error,而且这个RE很难查出原因。代码: 1 TreeNode *solve(TreeNode *root) { 2 if (!root) return NULL; 3 4 ...
分类:其他好文   时间:2015-01-30 14:31:21    阅读次数:121
SGU 200 Cracking RSA (高斯消元+大数高精度)
题目地址:SGU 200 这题居然还考大数高精度。。无语。。 令有该因子偶数个为0,奇数个为1,这样就满足异或运算了,即奇+奇=偶,偶+偶=偶,奇+偶=奇。然后建立方程高斯消元求变元个数free_num,那么子集的个数就是2^free_num-1。减1是去掉0的情况。注意要用大数运算 代码如下: #include #include #include #include #includ...
分类:其他好文   时间:2015-01-30 10:47:04    阅读次数:241
《你是我的小羊驼》游戏ios源码
gnore_js_op>  源码下载:http://code.662p.com/view/8582.html 你可能注意到了,神经猫换成了可爱的小羊驼:) 在线游戏地址:http://app9.download.anzhuoshang ... ge&isappinstalled=0 游戏分析 三个界面基本上就是整个游戏的全部内容: 1.左边的是主界面,展示游戏名称以及主...
分类:移动开发   时间:2015-01-30 10:46:04    阅读次数:248
Leetcode#153 Find Minimum in Rotated Sorted Array
原题地址简化版本的Find Minimum in Rotated Sorted Array II(参见这篇文章)二分查找最小值,每次只需要查看其中一个二分区间即可。如果A[i] A[j]则说明A[i..j]肯定是非连续的,说明最小值肯定出现在A[i..j]中当中,之后继续在这一半内查找,另一半可以....
分类:其他好文   时间:2015-01-30 10:40:27    阅读次数:127
《你是我的小羊驼》游戏ios源码
源码下载:http://code.662p.com/view/8582.html你可能注意到了,神经猫换成了可爱的小羊驼:)在线游戏地址:http://app9.download.anzhuoshang ... ge&isappinstalled=0游戏分析三个界面基本上就是整个游戏的全部内容:.....
分类:移动开发   时间:2015-01-30 10:39:45    阅读次数:143
抢滩登陆游戏android源码
是3d游戏开发技术详解与技术案例书里的一个例子 不多说上图{:soso_e113:}源码下载地址:http://code.662p.com/view/2271.html详细说明:http://android.662p.com/thread-289-1-1.html
分类:移动开发   时间:2015-01-30 10:38:02    阅读次数:188
Leetcode#152 Maximum Product Subarray
原题地址简单动态规划,跟最大子串和类似。一维状态空间可以经过压缩变成常数空间。代码: 1 int maxProduct(int A[], int n) { 2 if (n = 0; i--) {10 int tmp = minp;11 ...
分类:其他好文   时间:2015-01-30 10:36:58    阅读次数:179
Leetcode#106 Construct Binary Tree from Inorder and Postorder Traversal
原题地址二叉树基本操作[ ]O[ ][ ][ ]O代码: 1 TreeNode *restore(vector &inorder, vector &postorder, int ip, int pp, int len) { 2 if (len == 0) 3 ...
分类:其他好文   时间:2015-01-30 10:36:55    阅读次数:186
Leetcode#105 Construct Binary Tree from Preorder and Inorder Traversal
原题地址基本二叉树操作。O[ ][ ][ ]O[ ]代码: 1 TreeNode *restore(vector &preorder, vector &inorder, int pp, int ip, int len) { 2 if (len left = r...
分类:其他好文   时间:2015-01-30 10:36:12    阅读次数:125
Leetcode#151 Reverse Words in a String
原题地址将单词按空格分词,然后倒序拼接即可代码: 1 void reverseWords(string &s) { 2 vector words; 3 4 int start = -1; 5 int len = 0; 6 ...
分类:其他好文   时间:2015-01-30 10:30:11    阅读次数:157
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!