码迷,mamicode.com
首页 >  
搜索关键字:one discrete length    ( 47106个结果
Fiddler Post Debug
1. Post: http://localhost:11804/My/Commentfor plain html parameter submission, like the GET in URL:Request Header:User-Agent: FiddlerContent-Length: 3...
分类:其他好文   时间:2014-05-21 20:54:49    阅读次数:346
【leetcode】Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-05-21 20:00:51    阅读次数:296
【Leetcode】Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2014-05-21 19:08:08    阅读次数:195
最优二叉树
树的路径长度树的路径长度是从树根到树中每一结点的路径长度之和。在结点数目相同的二叉树中,完全二叉树的路径长度最短。树的带权路径长度(weighted path length of tree,wpl)结点的权值:在一些应用中,赋予树中结点的一个有某种意义的实数、结点的带权路径长度:结点到树根之间的路径...
分类:其他好文   时间:2014-05-21 19:02:14    阅读次数:305
Bash String Manipulation Examples – Length, Substring, Find and Replace--reference
In bash shell, when you use a dollar sign followed by a variable name, shell expands the variable with its value. This feature of shell is called para...
分类:其他好文   时间:2014-05-21 18:32:32    阅读次数:332
Css3 文字阴影和盒子阴影
文字阴影text-shadow的使用方法text-shadow: length length length color;前三个length分别表示 阴影离开文字的横方向距离(也就是X轴方向),阴影离开文字纵方向的距离 (即Y轴方向),阴影的模糊半径,color是指阴影的颜色专注前端div{ font...
分类:Web程序   时间:2014-05-21 17:38:35    阅读次数:304
使用构造函数初始化成员数组
#include using namespace std; class Box//盒子类 { public: //定义一个构造函数用于初始化对象数组 Box(int h, int w, int l); int volume();//计算盒子的体积 private: int height;//盒子的高 int width;//盒子的宽 int length;//盒子的长 }; ...
分类:其他好文   时间:2014-05-21 17:09:16    阅读次数:212
LeetCode: Count and Say [037]
【题目】 The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. Given an integer n, generate...
分类:其他好文   时间:2014-05-21 15:20:07    阅读次数:213
python实现代码行的统计
最近闲来无事写了一个统计C或者C++代码行数的程序,主要用到了python以及正则表达式 #-*-coding:utf-8 #!/usr/bin/python import re import os import sys '''get the file or dir in one path''' def getfilename(path): if os.path.exi...
分类:编程语言   时间:2014-05-21 15:06:30    阅读次数:379
活动安排问题python实现
活动安排问题要求高效地安排一系列争用某一公共资源的活动,贪心算法提供了一个简单的方法,使尽可能多的活动能兼容地使用公共资源。贪心算法并不总能求得问题的整体最优解,但对于活动安排问题,贪心算法却能做到,使得最终所确定的相容活动集合的规模最大,证明不在这里给出。代码如下: def greedyManage(meeting): length=len(meeting) meeting.sort(ke...
分类:编程语言   时间:2014-05-21 14:13:42    阅读次数:232
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!