上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页
摘要: 题目链接 题目要求: Given a singly linked listL:L0→L1→…→Ln-1→Ln, reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nod... 阅读全文
posted @ 2015-06-26 00:14 峰子_仰望阳光 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1.Linked List Cycle 题目链接 题目要求: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 刚看... 阅读全文
posted @ 2015-06-25 23:00 峰子_仰望阳光 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1.Reverse Linked List 题目链接 题目要求: Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you... 阅读全文
posted @ 2015-06-25 15:04 峰子_仰望阳光 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1. 套接字地址结构1.1 IPv4套接字地址结构 IPv4套接字地址结构通常也称为“网际套接字地址结构”,它以sockaddr_in命名,定义在头文件中。下边给出它的定义: 1)struct in_addr专门用来存储IP地址,对于IPv4来说,IP地址为32位无符号整数。其定义如下: 注... 阅读全文
posted @ 2015-06-24 18:01 峰子_仰望阳光 阅读(2129) 评论(0) 推荐(0) 编辑
摘要: 什么是网络套接字(Socket)?一时还真不好回答,而且网络上也有各种解释,莫衷一是。下文将以本人所查阅到的资料来说明一下什么是Socket。Socket定义 Socket在维基百科的定义:A network socket is an endpoint of an inter-process ... 阅读全文
posted @ 2015-06-24 16:58 峰子_仰望阳光 阅读(7711) 评论(0) 推荐(1) 编辑
摘要: 本文转载自一译作。 *注:netstat即network state缩写。 Netstat 简介 Netstat 是一款命令行工具,可用于列出系统上所有的网络套接字连接情况,包括 tcp, udp 以及 unix 套接字,另外它还能列出处于监听状态(即等待接入请求)的套接字。如果你想确认... 阅读全文
posted @ 2015-06-23 14:32 峰子_仰望阳光 阅读(786) 评论(0) 推荐(0) 编辑
摘要: 本文转自IBM博文Linux 套接字编程中的 5 个隐患。 “在异构环境中开发可靠的网络应用程序”。 Socket API 是网络应用程序开发中实际应用的标准 API。尽管该 API 简单,但是开发新手可能会经历一些常见的问题。本文识别一些最常见的隐患并向您显示如何避免它们。 在 4.2 ... 阅读全文
posted @ 2015-06-23 14:29 峰子_仰望阳光 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 本文转自博文C/C++预处理指令#define,#ifdef,#ifndef,#endif…。这篇博文写得特别好,特转载。 本文主要记录了C/C++预处理指令,常见的预处理指令如下:#空指令,无任何效果#include包含一个源代码文件#define定义宏#undef取消已定义的宏#if如果给... 阅读全文
posted @ 2015-06-23 10:25 峰子_仰望阳光 阅读(6320) 评论(0) 推荐(1) 编辑
摘要: 《UNIX网络编程 卷1》的源码可以从www.unpbook.com下载得到。解压之后的目录为unpv13e。详细步骤编译 进入unpv13e目录,按如下步骤编译: 1 ./configure 2 3 cd lib 4 make // 可能遇到问题:redefinition of ‘st... 阅读全文
posted @ 2015-06-22 15:21 峰子_仰望阳光 阅读(1873) 评论(0) 推荐(1) 编辑
摘要: 题目链接 题目要求: Given two stringssandt, determine if they are isomorphic. Two strings are isomorphic if the characters inscan be replaced to gett. Al... 阅读全文
posted @ 2015-06-21 19:56 峰子_仰望阳光 阅读(267) 评论(1) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页