码迷,mamicode.com
首页 >  
搜索关键字:empty    ( 6963个结果
hdu 1226 BFS + bfs记录路径
http://acm.hdu.edu.cn/showproblem.php?pid=1226 为了省空间,可以用vis数组初始化的时候初始化为-1, 发现一个BFS容易错的地方 开始一直WA在这里:就是我int tp=q.front();之后马上q.pop();了,然后才去判断是不是符合条件以break,这样就不能根据q.empty()==1认为没有找到ans 因为这里WA了 其实也可以vi...
分类:其他好文   时间:2014-10-05 01:33:47    阅读次数:490
学习心得:C语言,在形参中的引用类型,使用GCC编译不通过的两种办法
char CLinkListDelete(CircularLinkList &CL){ //删除表尾元素 if(CL->next == CL) { printf("List is EMPTY!\n"); return 0; ...
分类:编程语言   时间:2014-10-03 19:22:55    阅读次数:149
[leetcode] Scramble String @python
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:编程语言   时间:2014-09-30 02:51:41    阅读次数:394
PowerDesigner根据NAME自动生成注释
menu: [Database]->[Database Generation] ? tab: ?[Tables & Views]->check table & column ‘s comment ? ? ? [Options]->Generation name in empty comment...
分类:其他好文   时间:2014-09-29 16:59:31    阅读次数:186
页面生命周期
页面pr方法内部处理过程:第一步:根据Form里面的请求内容(ViewState)确定是否是IsPostBack第二步:页面初始化之前 this.PerformPreInit() { this.OnPreInit(EventArgs.Empty);//一般在这里面...
分类:其他好文   时间:2014-09-29 15:35:51    阅读次数:137
STL:string 大小(Size)和容量(Capacity)
strings存在三种“大小”:1、size()和length() 返回string中现在的字符个数。上述两个函数等效。成员函数empty()用来检验字符数是否为0,亦即字符串是否为空。你应该优先使用该函数,因为它比length()或size()来得快。也就是说,使用if(s.empty()==tr...
分类:其他好文   时间:2014-09-29 00:15:16    阅读次数:248
Shell编程入门(第二版)(上)
简单的示例Shell程序示例1.#!/bin/bash #This is to show what a shell script looks like echo "Our first example" echo # This inserts an empty line in output. echo "We are currently in the following directory." /b...
分类:其他好文   时间:2014-09-28 20:05:46    阅读次数:266
php empty()和isset()的区别
empty() 判断变量是否为“空”,isset() 判断变量是否已经设置。例:$id=0;empty($id)?print"It'sempty.":print"It's$id.";//结果:It'sempty.!isset($id)?print"It'sempty.":print"It's$id....
分类:Web程序   时间:2014-09-28 13:02:02    阅读次数:171
2015百度校招笔试杭州站
1:请描述数据结构中栈和队列的区别。并说出3个操作。 答:栈先进后出。队列先进先出。例如(pop() push() empty() back() front()); 2:请描述一下C++中多态。举个例子: 我学java的。但我记得多态应该是重载和重写。 重载 Class A { int foo(int a){...} int foo(int a,int b){...}...
分类:其他好文   时间:2014-09-27 02:11:49    阅读次数:191
C++的空类中默认产生哪些类成员函数
1 class Empty 2 { 3 public: 4 Empty(); 5 Empty(const Empty&); 6 ~Empty(); 7 Empty & operator =(const Empty &); 8 Empt...
分类:编程语言   时间:2014-09-26 23:47:08    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!