码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
使用jquery修改表单的提交地址
基本思路: 通过使用jquery选择器得到对应表单的jquery对象,然后使用attr方法修改对应的action 示例程序一: 默认情况下,该表单会提交到page_one.html 点击button之后,表单的提交地址就会修改为page_two.html jquery test 修改form的提交地址为page_two.html var $fun = ...
分类:Web程序   时间:2014-06-29 07:33:12    阅读次数:236
Divide Two Integers
用减法可能会超时,但可以用二分 class Solution { public:     int divide(int d1, int d2) {//       d1/d2         if(d1==0)             return 0;         if(d2==1)             return d1;         if(d2==-1)    ...
分类:其他好文   时间:2014-06-29 07:22:02    阅读次数:208
Checkio: Roman numerals
题目: Roman numerals come from the ancient Roman numbering system. They are based on specific letters of the alphabet which are combined to signify the sum (or, in some cases, the difference) of th...
分类:其他好文   时间:2014-06-20 12:27:09    阅读次数:394
Euler Project 1 -- 鸽巢原理
题目要求 1000 内可以被 3 或者 5 整除的数字之和 可以很简单地这么写: print sum( [ i for i in xrange( 1000 ) if i % 3 == 0 or i % 5 == 0 ] ) 但是对于10^10的数据,要运行很长时间,可以利用一点鸽巢原理 10^10中能被 3 整除的数据和加上能被 5 整除的数据和减去能被 15 整除的数据和即可,求...
分类:其他好文   时间:2014-06-20 11:46:19    阅读次数:249
LeetCode: Balanced Binary Tree [110]
【题目】 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. 【题意】 判断二叉树是否是平衡二叉树 【思路】 平衡二...
分类:其他好文   时间:2014-06-20 11:02:54    阅读次数:173
leetcode -day27 Recover Binary Search Tree & Interleaving String
1、 ?? Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty...
分类:其他好文   时间:2014-06-20 10:13:49    阅读次数:243
Balanced Binary Tree
题目 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node...
分类:其他好文   时间:2014-06-20 09:02:56    阅读次数:232
Path Sum
题目 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary t...
分类:其他好文   时间:2014-06-07 15:31:32    阅读次数:179
Path Sum II
题目 Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 ...
分类:其他好文   时间:2014-06-07 13:47:22    阅读次数:191
杭电OJ(HDU)-ACM Steps-Chapter Two-《Biker's Trip Odometer》《Climbing Worm》《hide handkerchief》《Nasty Hac》
杭电OJ(HDU)-ACM Steps-Chapter Two-《Biker's Trip Odometer》《Climbing Worm》《hide handkerchief》《Nasty Hac》...
分类:其他好文   时间:2014-06-07 11:39:31    阅读次数:315
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!