/*
============================================================================
Name : TestVariable.c
Author : lf
Version :
Copyright : Your copyright notice
Description : brea...
分类:
其他好文 时间:
2015-02-22 20:45:45
阅读次数:
117
1、第一个hellowolrd程序。【输出】2、交互程序。【如何从文件读取,从键盘读取,输出到文件,输出到屏幕。IO】3、for循环,break,continue等【流程控制程序】4、函数调用方面【如何函数调用,模块调用】4、与数据库打交道的类或模块【数据库读取方面】5、异常处理方面6、面向对象方面
分类:
编程语言 时间:
2015-02-22 17:20:44
阅读次数:
141
例一:for循环for i in range(1,100): if i==23: print "great,%s you got your lucky number:" %(i) break else: p...
分类:
编程语言 时间:
2015-02-22 16:53:17
阅读次数:
189
if()...else... (条件语句)for()... (循环语句)whlie().... (循环语句)do...while() (循环语句)switch()... (选择分支语句)continue (结束本次循环,直接进入到下次循环)break (跳出循环或s...
分类:
其他好文 时间:
2015-02-22 13:24:08
阅读次数:
122
139. Word Break leetcode链接:https://oj.leetcode.com/problems/word-break/ DP的思想。设置boolean数组存储,canBreak[i]表示0~i的字符是否满足public boolean wordBreak(String s, ...
分类:
其他好文 时间:
2015-02-20 08:38:59
阅读次数:
163
Master-Mind HintsMasterMind is a game for two players. One of them,Designer, selects a secret code. The other,Breaker, tries to break it. A code is no...
分类:
其他好文 时间:
2015-02-19 19:46:36
阅读次数:
165
intInversionNumber(char*s,intlen){intans=0;//s逆序数intA,C,G;//各个字母出现次数,T是最大的,无需计算T出现次数A=C=G=0;for(inti=len-1;i>=0;i--){switch(s[i]){case'A':A++;break;//...
分类:
编程语言 时间:
2015-02-18 10:40:43
阅读次数:
205
由leetcode139题Word Break产生的对动态规划的一点思考。
题目要求是这样的:
Given a string s and a dictionary of words dict,determine if s can be segmented into a space-separatedsequence of one or more dictionary words.
For e...
分类:
其他好文 时间:
2015-02-16 16:59:00
阅读次数:
158
有时,table表格中列过多、内容多时,常常会根据每列的业务含义,挑出一些列,设置他们的宽度变窄。
但是总是有例外。比如有一条数据在那一列刚好内容特别多,那么页面显示中其内容将显示不全。
解决办法:标签内增加style="word-wrap:break-word;"样式。
表格固定宽度时,内容自动换行
white-space:norma...
分类:
其他好文 时间:
2015-02-16 14:20:00
阅读次数:
210
dfs可以使用堆栈实现,也可以使用递归的方式实现。利用堆栈的形式伪代码如下:本文都是以走迷宫为例子DFS:将起点标记为已走过的点,并压栈;while(栈不为空){ 从栈顶弹出一个点P; if(p是终点) break; 否则沿上下左右四个方向探索 if(和P相邻的点有路可走,并且没有走过...
分类:
其他好文 时间:
2015-02-15 19:19:07
阅读次数:
1006