自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode Group Anagrams

Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]Note:

2016-02-29 17:32:16 675

原创 LeetCode Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio

2016-02-29 17:09:58 377

原创 LeetCode Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.题意:给出一个链表,包含next和random结点,作深拷贝

2016-02-29 15:15:59 378

转载 针对架构设计的几个痛点,我总结出的架构原则和模式

本文作者介绍了架构设计的原则以及什么是架构,并分析了4种常用的软件架构模式,分别是分层架构、事件驱动架构、微内核架构和微服务架构。点击阅读原文可查看完整PPT。分层架构分层架构是最常见的架构,也被称为n层架构。多年以来,许多企业和公司都在他们的项目中使用这种架构,它已经几乎成为事实标准,因此被大多数架构师、开发者和软件

2016-02-29 11:26:19 1475

转载 C++ 中的模板类声明头文件和实现文件分离后,如何能实现正常编译?

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。作者:余天升链接:http://www.zhihu.com/question/20630104/answer/15722407来源:知乎谢@欲三更 邀,这个问题让我想起我在实习的时候犯的一个错误,就是把模版类的定义和实现分开写了,结果编译出错,查了两天才查出问题。C++中每一个对象所占用的空间大小,

2016-02-28 17:08:07 1471

原创 LeetCode Fraction to Recurring Decimal

Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating, enclose the repeating part in parentheses.

2016-02-23 22:31:12 551

原创 LeetCode H-Index

Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According to the definition of h-index on Wikipedia: "A

2016-02-23 16:45:36 471

原创 LeetCode Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.题意:平面上给出n个点,求在同一条直线上的最多点。思路:主要是用斜率。但是注意,水平和竖直方面上的。水平方向的斜率为0,但是浮点计算时,会出现0.0 和-0.0的问题,所以在计算水平方向时,

2016-02-23 11:48:24 339

转载 Nginx源码分析:核心模块剖析及常见问题

Nginx 在解析完请求行和请求头之后,一共定义了十一个阶段,分别介绍如下HTTP 模块工作原理HTTP 处理的十一个阶段定义typedef enum {         NGX_HTTP_POST_READ_PHASE = 0, // 读取请求内容阶段           NGX_HTTP_SERVER_REWRITE_PHASE, // Se

2016-02-23 10:54:23 1141

转载 Nginx源码分析:3张图看懂启动及进程工作原理

图一:nginx 启动及内存申请过程分析任何程序都离不开启动和配置解析。ngx 的代码离不开 ngx_cycle_s 和 ngx_pool_s 这两个核心数据结构,所以我们在启动之前先来分析下。内存申请过程分为 3 步假如申请的内存小于当前块剩余的空间,则直接在当前块中分配。假如当前块空间不足,则调用 ngx_palloc_block

2016-02-23 10:51:46 1123

原创 LeetCode Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo

2016-02-22 15:23:42 429

原创 LeetCode Minimum Window Substring

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BAN

2016-02-21 13:40:47 440

原创 LeetCode Repeated DNA Sequences

All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.Wri

2016-02-20 13:37:49 423

原创 LeetCode Substring with Concatenation of All Words

You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in wordsexactly once and w

2016-02-20 13:23:24 402

原创 LeetCode Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution.A sudoku

2016-02-18 15:27:36 370

原创 LeetCode Bulls and Cows

You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint t

2016-02-18 14:27:53 458

原创 LeetCode Count Primes

Description:Count the number of prime numbers less than a non-negative number, n.题意:给出一个数n,求小于n的素数的个数 思路:用 Sieve of Eratosthenes代码如下:class Solution{ public int countPrimes(i

2016-02-17 14:38:26 489

原创 LeetCode Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2016-02-17 14:30:37 320

原创 LeetCode Isomorphic Strings

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anot

2016-02-16 11:24:58 411

原创 LeetCode Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e

2016-02-15 16:01:50 418

转载 解读分库分表中间件Sharding-JDBC

分库分表适用场景分库分表用于应对当前互联网常见的两个场景——大数据量和高并发。通常分为垂直拆分和水平拆分两种。垂直拆分是根据业务将一个库(表)拆分为多个库(表)。如:将经常和不常访问的字段拆分至不同的库或表中。由于与业务关系密切,目前的分库分表产品均使用水平拆分方式。水平拆分则是根据分片算法将一个库(表)拆分为多个库(表)。如:按照ID的最后一位以3取余,尾数是1的放入第1

2016-02-15 14:17:34 2873

转载 支撑微博千亿调用的轻量级RPC框架:Motan

随着微博容器化部署以及混合云平台的高速发展,RPC 在微服务化的进程中越来越重要,对 RPC 的需求也产生了一些变化。今天主要介绍一下微博 RPC 框架 Motan,以及为了更好的适应混合云部署所做的一些改进。RPC 框架的发展与现状RPC(Remote Procedure Call)是一种远程调用协议,简单地说就是能使应用像调用本地方法一样的调用远程的过程

2016-02-15 10:25:23 2122

原创 LeetCode Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may ass

2016-02-14 17:30:24 310

原创 LeetCode Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A partially fille

2016-02-14 16:58:19 349

转载 途牛网站无线架构变迁实践

途牛从一开始的单机系统,发展到现在已拥有数百个分布式部署的系统。本文主要将途牛网站无线系统在从小到大的过程中,遇到的问题以及解决方法与大家分享,希望为大家带来一定借鉴。文章将从服务化推进、南北京机房之痛、性能提升实践、App客户端技术演进四个方面进行介绍。服务化推进途牛的服务化始于2011年,当时我们主要进行了会员的服务化,2012年进行了搜索2.0的服务化,2013年是服务化大举

2016-02-14 10:47:54 1248

flash精彩实例chm

介绍flash基本操作以及mtv制作和as

2009-11-20

Linux C编程一站式学习

添加了GFDL许可证,正式网络发布。第三部分还很粗糙,错误也有不少,有待改进。第一部分和第二部分已经比较成熟,第二部分还差三章没写。

2009-09-11

Ubuntu Linux实用学习教程.pdf

Ubuntu 完全基于 Linux 操作系统, 可以免费得到社区及专业机构的支持。庞大的社区是它成长的沃土,请向这片动人的热忱敞开心扉。

2009-09-11

空空如也

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

TA关注的人

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