自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (10)
  • 收藏
  • 关注

原创 Remove Nth Node From End of List —— Leetcode

Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the

2015-03-31 10:51:08 525

原创 Longest Common Prefix —— Leetcode

Write a function to find the longest common prefix string amongst an array of strings. 本想用C++写,但想想太没挑战性,干脆直接用C。下面是代码,然而,和很多leetcoder提交的答案一样,在[""]这个测试用例下卡住了,不知为何。 方法很简单,就是所有字符串从第一个开始向后遍历,直到有不一样的,即为公共

2015-03-31 10:29:55 594

原创 String to Integer (atoi) —— Leetcode

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2015-03-30 15:41:04 452

原创 Min Stack —— Leetcode

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get

2015-03-27 14:54:55 494

原创 反转一个整数

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for y

2015-03-26 22:14:07 1063

原创 版本号的比较

Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0. You may assume that the version strings are non-empty and co

2015-03-24 20:47:36 493

原创 统计一个数的阶乘后面0的个数

Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 要求对数时间。 首先分析,只有2*5=10才会产生一个0,N!中2的数量永远大于5的数量,所以该题的目标简化为求N!中5的个数。

2015-03-23 15:21:39 973

原创 输出Pascal's Triangle(杨辉三角)

Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] C++做此题,很简单,但由于STL的vector掌握不好

2015-03-22 22:09:12 986

原创 反转二进制数

Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as0011100101

2015-03-20 10:59:53 3250

原创 二进制中1的个数

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11' has binary representation 000000

2015-03-20 10:24:05 510

原创 单机存储系统

首先,我们下个定义,什么是单机存储引擎? 单机存储引擎就是哈希表、B树等数据结构在机械磁盘、SSD等持久化介质上的实现。 单机存储系统的理论来源于关系数据库,关系数据库中,事务(一组操作)的ACID特征要牢记(Atomicity, Consistency, Isolation, Durability)。 1. 硬件基础 这些是最底层的硬件基础。 (1)CPU架构 经典的多CPU

2015-03-18 20:53:51 2364

原创 分布式存储系统概述

云计算、大数据,这些热点词汇,后台的基础设施离开不了分布式存储系统,它的两个特点,一是规模大,二是成本低。其实分布式系统的设计是根据需求来变化的,那么我们接下来就看,我们需要存储哪些数据,以及,分布式存储系统有哪些分类。 1. 分布式存储的数据 大致可以分为三类: 非结构化数据:文档、图片、视频等;结构化数据:这个最容易理解,关系数据库中存的表(比如员工名称、信息等等),模式

2015-03-18 20:31:30 1353

原创 C++成员函数

“The Semantics of Function”,本篇的架构很简单,说的是member functions在nonstatic,static和virtual三种状态下的调用方式。 首先来一个开胃菜:假设类Point3d有data members x, y, z,有member function如下, float Point3d::magnitude() const { retur

2015-03-10 20:13:25 588

原创 C++数据成员

第三章的标题是“The semantics of data”,讲的是data members在继承、多态下的特性。 (1)如果一个class中不含data,那么它在sizeof的运算下的表现是什么样的? 假如我们有如下继承关系,并且这四个类中都不包含任何数据成员: class X { }; class Y : public virtual X { }; class Z : publi

2015-03-09 10:32:51 803

原创 Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element

2015-03-06 18:17:38 481

原创 链表反转

Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy t

2015-03-04 21:57:32 516

Loop-free routing using diffusing computations

Abstract-A family of distributed algorithms for the dynamic computation of the shortest paths in a computer network or Memet is presented, validated, and analyzed. According to these algorithms, each node maintains a vector with its distance to every other node. Update messages from a node are sent only to its neighbors; each such message contains a dktance vector of one or more entries, and each entry specifies the length of the selected path to a network destination, as well as m indication of whether the entry constitutes an update, a query, or a reply to a previous query. The new algorithms treat the problem of distributed shortest-path routing as one of diffusing computations, which was firzt proposed by Dijkztra and Scholten. They improve on algorithms introduced previously by Chandy and Misra, JatYe and Moss, Merlin and Segatl, and the author. The new algorithms are shown to converge in finite time after an arbitrary sequence of link coat or topological changes, to be loop-free at every instan~ and to outperform all other loop-free routing algorithms previously proposed from the standpoint of the combined temporal, message, and storage complexities.

2012-05-04

SQL注射技术总结文档

这是一份翻译的SQL注射技术总结文档 1、简介 2、漏洞测试 3、收集信息 4、数据类型 5、抓取密码 6、创建数据库帐号 7、MYSQL利用 8、服务名和配置 9、在注册表中找VNC密码 10、刺穿IDS认证 11、在MYSQL中使用char()欺骗 12、用注释躲避IDS认证 13、构造无引号的字符串

2012-03-19

泛型编程与设计新思维

永远记住,编写代码的宗旨在于简单明了,不要使用语言的冷僻特征,耍小聪明,重要的是编写你理解的代码,理解你编写的代码,这样你可能会做的更好。

2012-03-19

C语言标准与实现

基本概念、P6处理器的栈、从汇编语言开始、编译链接和库、动态库简介

2012-03-15

Cisco IP Routing: Packet Forwarding and Intra-domain Routing Protocols

Focusing on intra-domain dynamic routing protocols this book provides an in-depth understanding of IP routing and forwarding technologies, and their implementation within Cisco routers.

2012-05-03

dynamips路由模拟软件及源码

资源包括dynamips路由模拟软件及源码,软件运行需要Winpcap

2012-04-26

Linux命令大全

很全的Linux命令集合,包括每个命令的功能说明、语法、补充说明、参数等,支持索引查询,很好的一本书

2012-03-15

国标软件设计文档

操作手册、测试分析报告、测试计划、概要设计说明书、开发进度月报、可行性研究报告、软件需求说明书

2012-03-15

深入理解linux虚拟内存管理(中文版)

深入理解linux虚拟内存管理(中文版)扫描版

2013-04-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除