码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Leetcode: Binary Search Tree Iterator
题目: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next() and...
分类:其他好文   时间:2015-03-29 00:38:50    阅读次数:201
【leetcode刷题笔记】Excel Sheet Column Number
Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ...
分类:其他好文   时间:2015-03-29 00:33:18    阅读次数:138
数据库分页
createproc proc_paging(@pageSizeint,@pageCurrentint)asbeginselect*from(selectROW_NUMBER()over(ORDERBY 排序字段) rownum,*from 表) 别名whererownum between(@pag...
分类:数据库   时间:2015-03-29 00:28:59    阅读次数:189
SPOJ - DQUERY 主席树
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=32356Given a sequence of n numbers a1, a2, ..., anand a number of d-queries. A d-quer...
分类:其他好文   时间:2015-03-28 23:12:30    阅读次数:238
小学生四则运算
package yun;import java.util.Random;import java.util.*;public class number { /** * 作者:范铭祥 * 功能:一个简单的小学生四则运算生成系统 */ public static voi...
分类:其他好文   时间:2015-03-28 23:05:00    阅读次数:158
Distinct Subsequences
Distinct Subsequences问题:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which...
分类:其他好文   时间:2015-03-28 21:45:13    阅读次数:167
LeetCode Single Number I II Python
Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one. def singleNumber(self, A): l = len(...
分类:编程语言   时间:2015-03-28 21:44:31    阅读次数:234
Single Number
/*异或的简单应用 a^a = 0*/class Solution {public: int singleNumber(int A[], int n) { int sum = 0; for(int i = 0 ; i < n ; i++){ s...
分类:其他好文   时间:2015-03-28 21:41:34    阅读次数:115
leetcode------Two Sum
标题:Two Sum通过率:17.9%难度:中等Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should retu...
分类:其他好文   时间:2015-03-28 21:32:14    阅读次数:110
leetcode第9题-Palindrom Number
这是leetcode的第九题,相对来说比较简单,目的很简单,就是判断一个int型的数是不是回文数。但是有几点需要考虑: 负数应该没有回文数,要加判断!要注意额外的空间申请问题。判断是否是回文数势必要对一个数进行反转,反转的时候就要考虑溢出的问题。实现的代码如下:#include bool isPalindrom(int x) { if(x<0) return false; el...
分类:其他好文   时间:2015-03-28 20:30:37    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!