The C Programming Language 经典代码 any(s1,s2)
/*
* Exercise 2-5 Page 48
*
* Write the function any(s1,s2), which returns the first location
* in the string s1 where any character from the string s2 occurs,
* or -1 if s1 contains no characters from s2. (The standard library
* function strpbrk does the same job but returns a pointer to the
* location.)
*
*/
Here's a much better solution, by Partha Seetala. This solution has a worst-
case time complexity of only O(n + m) which is considerably better.
相关文档:
简述C和C++程序员学习历程
收藏
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
......
C版本:
vim stash.h
#ifndef STASH_H
#define STASH_H
typedef struct STASHTag {
int size; /* Size of each space */
int quantity; /* Number of storage spaces */
int next; /* Next empty space */
/* Dynamically allocated array of bytes: */
unsigned char* ......
W3C标准的HTML标签
按功能类别排列
DTD:指示在哪种 XHTML 1.0 DTD 中允许该标签。
S=Strict,严格类型, T=Transitional,过渡类型【最普遍】, F=Frameset,框架类型.
标签成对,xhtml是比html更严格,类似XML格式
标签描述DTD
<!DOCTYPE>
定义文档类型。
STF
<html>
定义 HTML 文档。
STF
< ......
C/C++是最主要的编程语言。这里列出了50名优秀网站和网页清单,这些网站提供c/c++源代码 。这份清单提供了源代码的链接以及它们的小说明。我已尽力包括最佳的C/C++源代码的网站。这不是一个完整的清单,您有建议可以联系我,我将欢迎您的建 议,以进一步加强这方面的清单。
1、http://snippets.dzone.com/tag/c/&nbs ......