这次主要把循环结构的控制语句补上,主要包含while、for、continue、break、循环嵌套。主要写一些基本的认识以及包含的一些实例。当只有唯一路径且只跑一次的时候选择上一节中的选择结构语句就可以了,但是当执行一次或者重复循环执行时就需要另辟蹊径了,那就来认识一下这个蹊径吧。 一、while ...
分类:
编程语言 时间:
2019-02-09 10:26:08
阅读次数:
203
"1297. Palindrome" Time limit: 1.0 second Memory limit: 64 MB The “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states tha ...
分类:
编程语言 时间:
2019-02-07 20:34:01
阅读次数:
144
算法描述: Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X ...
分类:
其他好文 时间:
2019-02-05 22:12:46
阅读次数:
108
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we ...
分类:
其他好文 时间:
2019-02-04 18:09:31
阅读次数:
202
练习3-4 统计字符 (15 分) 本题要求编写程序,输入10个字符,统计其中英文字母、空格或回车、数字字符和其他字符的个数。 输入格式: 输入为10个字符。最后一个回车表示输入结束,不算在内。 输出格式: 在一行内按照 letter = 英文字母个数, blank = 空格或回车个数, digit ...
分类:
编程语言 时间:
2019-02-03 10:34:13
阅读次数:
306
A1039.Course List for StudentZhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, yo ...
分类:
其他好文 时间:
2019-02-02 00:44:38
阅读次数:
179
原文作者:smallnest 转自GO语言社区 首先来了解一下来自维基百科上关于CPU缓存的介绍。 在计算机系统中,CPU高速缓存(英语:CPU Cache,在本文中简称缓存)是用于减少处理器访问内存所需平均时间的部件。在金字塔式存储体系中它位于自顶向下的第二层,仅次于CPU寄存器。其容量远小于内存 ...
分类:
系统相关 时间:
2019-01-28 23:53:21
阅读次数:
274
// 字符串的下划线格式转驼峰格式,eg:hello_world => helloWorld function underline2Hump(word) { return word.replace(/_(\w)/g, function (all, letter) { return letter.to ...
分类:
其他好文 时间:
2019-01-27 21:31:05
阅读次数:
221
<?php $str1 = ('paiza'); $str2 = ('apple'); $str3 = ('letter'); function bigTower($str1, $str2, $str3) { $str1 = trim($str1); $str2 = trim($str2); $st... ...
分类:
其他好文 时间:
2019-01-27 18:53:50
阅读次数:
195
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le ...
分类:
其他好文 时间:
2019-01-26 12:30:21
阅读次数:
104