码迷,mamicode.com
首页 >  
搜索关键字:end    ( 30778个结果
19. Remove Nth Node From End of List Leetcode Python
Given a linked list, remove the nth node from the end of list and return its head. For example,    Given linked list: 1->2->3->4->5, and n = 2.    After removing the second node from th...
分类:编程语言   时间:2015-01-29 12:44:36    阅读次数:191
折半查找
网上看到的,不是C的,改成了C的……===========================一. 方法原理当从一个给定的序列数组arr中, 查找某个特定值value时, 折半搜索法是这样做的:1. 确定搜索范围的起始点: 起点start = 0, 终点end = 数组长size – 1;2. 根据起始...
分类:其他好文   时间:2015-01-29 12:34:45    阅读次数:254
SQL中的case when then else end用法
Case具有两种格式。简单Case函数和Case搜索函数。--简单Case函数CASE sex WHEN '1' THEN '男' WHEN '2' THEN '女'ELSE '其他' END--Case搜索函数CASE WHEN sex = '1' THEN '男'...
分类:数据库   时间:2015-01-29 11:49:00    阅读次数:201
[iOS]NSURLConnection的一个小例子
直接上代码了。。。在iOS7之后可以使用NSURLSession,但是考虑到兼顾iOS6还是使用NSURLConnection。@interface ViewController() @property (nonatomic,strong) NSMutableData *receivedData; @end @implementation ViewController - (void)vie...
分类:移动开发   时间:2015-01-29 10:25:23    阅读次数:158
两个日期的时间差
有两个日期数据START_DATE,END_DATE,欲得到这两个日期的时间差(以天,小时,分钟,秒,毫秒): 天: ROUND(TO_NUMBER(END_DATE - START_DATE)) 小时: ROUND(TO_NUMBER(END_DATE - START_DATE) * 24...
分类:其他好文   时间:2015-01-29 10:23:35    阅读次数:103
给定一个有序数组(递增),写程序构建一棵具有最小高度的二叉树。
给定一个有序数组(递增),写程序构建一棵具有最小高度的二叉树。 struct Node { int value; Node *left; Node *right; }; void createTree(int a[], int begin, int end, Node* &r...
分类:编程语言   时间:2015-01-29 09:37:31    阅读次数:226
[C++]LeetCode: 130 Word Ladder (BFS)
题目: Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a timeEach intermediate...
分类:编程语言   时间:2015-01-29 09:34:19    阅读次数:1950
【VBA研究】循环中用VBA在单元格中输入公式
作者:iamlaosong 先看一个简单的循环程序,VBA从数据库中读取数据后,需要在最后一个单元格输入求和公式: lineno = [A65536].End(xlUp).Row For i = 3 To lineno Cells(i, 9).FormulaR1C1 = "=RC[-3]+RC[-2]+RC[-1]" Next i 公式的意思相当于Cells(i, 9)...
分类:编程语言   时间:2015-01-29 09:21:21    阅读次数:204
python-time模块计算程序运行的时间
计算python程序的运行时间方法1importdatetimestarttime=datetime.datetime.now()#longrunningendtime=datetime.datetime.now()print(endtime-starttime).seconds方法2start=time.time()run_fun()end=time.time()printend-start方法3start=time.clock()run_fun()end=time.clock..
分类:编程语言   时间:2015-01-28 19:56:35    阅读次数:221
iOS复习笔记2:Objective-C语法基础
1 关键字 关键字基本上都是以@开头,常见关键字如下: @interface,@implement,@end,@public,@private,@selector,@required,@encode等 其他id,self,super等 2 字符串以@开头 @"Hello world!" 3 布尔类型Yes/No 4 空类型nil(值为0) 5 其他C...
分类:移动开发   时间:2015-01-28 19:48:22    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!