自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(44)
  • 资源 (2)
  • 收藏
  • 关注

原创 [LeetCode] Sort List

LeetCode: https://oj.leetcode.com/problems/sort-list/

2014-09-21 22:01:34 447

原创 [LeetCode] Reorder List

Given a singly linked list L: 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 nodes' values.For example,Given {1,2,3,4}, reorder it to {1,4

2014-09-21 21:53:23 580

原创 [LeetCode] Candy

LeetCode: https://oj.leetcode.com/problems/candy/ ti

2014-09-21 21:42:07 427

原创 [LeetCode]Longest Valid Parentheses

Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()", which

2014-09-21 21:29:22 582

原创 [LeetCode]Binary Tree Maximum Path Sum

Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Return 6.

2014-09-21 18:05:57 429

原创 [LeetCode] Median of Two Sorted Arrays

Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n))LeetC

2014-09-21 17:50:18 478

原创 [LeetCode] Palindrome Partitioning && Palindrome Partitioning II

Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = "aab",

2014-09-21 17:09:17 382

原创 [LeetCode] Word Break && Word Break II

Given a string s and a dictionary of words dict, determine ifs can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet",

2014-09-21 16:23:50 441

原创 [LeetCode]Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total number

2014-09-21 15:24:59 399

原创 [LeetCode] String to Integer(atoi)

String to Integer(atoi)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 wha

2014-09-19 16:10:30 453

原创 [LeetCode] Surrounded Regions

Surrounded RegionsGiven a 2D board containing 'X' and 'O', capture all regions surrounded by'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For example,

2014-09-19 15:58:59 376

原创 [LeetCode]Merge Intervals && Insert Interval

LeetCode: https://oj.leetcode.com/problems/merge-intervals/

2014-09-19 15:34:29 520

原创 进程间同步问题

临界区:临界区是指不同的进程中,有可能fangwen

2014-09-18 16:37:27 1157

原创 进程间通信(IPC)

进程间通信的机制包括共享内存和

2014-09-17 17:06:16 650

原创 [LeetCode] Reverse Words in a String

Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification

2014-09-14 16:43:23 491

原创 [LeetCode] Word Search

Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically n

2014-09-14 16:03:49 405

原创 [LeetCode] Word Ladder

LeetCode: https://oj.leetcode.com/problems/word-ladder/

2014-09-14 15:44:06 556

原创 Java基础类库概述

前言Java在它的基础类库中

2014-09-13 23:21:07 512

原创 Java深度拷贝

基本概念浅拷贝:复制后对象的所有基本类型域的值与原对象相等,所有引用指向的对象和原对象指向的对象相同深拷贝:复制后对象的所有基本类型的值与原对象相等,且他们的引用指向不同的对象,但对象中的基本类型域的值相等,假如其中还包含引用,则指向的对象同样被拷贝了一份,以此类推(即所有引用链上的对象都被拷贝了一份)依赖clone方法的深度拷贝在Java的Object类中有一个clone方法

2014-09-13 22:52:46 1286

原创 Java中equals方法和hashCode方法

《Effective Java》第2版中的第9条条款

2014-09-13 17:43:33 536

转载 Unix Socket编程简介

Unix/Linux操作系统暴露给应用层的网络编程接口时Socket

2014-09-13 13:32:11 463

原创 TCP连接的建立与终止

TCP是通过三次握手建立连接的,其过程如下:

2014-09-12 21:27:07 482

原创 [LeetCode]Combinations

LeetCode: https://oj.leetcode.com/problems/combinations/该题采用DFS的方法来解决,和Permutations,N-Queens的解决方式类似:代码如下:public class Solution { public List> combine(int n, int k) { List> comb

2014-09-12 19:50:20 397

原创 [LeetCode]Binary Tree Maximum Path Sum

LeetCode: https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/

2014-09-12 19:40:15 438

原创 [LeetCode] Path Sum && Path Sum II

Path Sum: https://oj.leetcode.com/problems/path-sum/Path Sum II: https://oj.leetcode.com/problems/path-sum-ii/

2014-09-12 18:54:23 497

原创 [LeetCode] Search in Rotated Sorted Array

LeetCode: https://oj.leetcode.com/problems/search-in-rotated-sorted-array/

2014-09-12 16:20:27 408

原创 树的遍历

本文对树的遍历操作做个总结:1. 前序遍历递归实现:public class Solution { public List preorderTraversal(TreeNode root){ List result = new ArrayList(); preOrder(result, root); return result; } private void pr

2014-09-12 15:26:26 366

原创 多路归并排序

在经典的归并排序中,我们采用的都是二路

2014-09-12 12:33:52 579

原创 网络IO总结

网络IO的模式包括同步IO,异步IO,阻塞IO,非阻塞IO;这些IO模式之间的区别和联系是任何一个搞网络编程(Socket编程)的人必须弄清楚的问题,下面我们就来一层层的揭开他们的面纱吧。在Unix网络编程第一卷第六章中讨论了五种IO模型:1. 阻塞IO(Blocking IO)2. 非阻塞IO(Nonblocking IO)3. IO多路复用(IO multiplexing)

2014-09-10 16:55:05 502

原创 动态规划解决经典问题

动态规划的思想对于解决最优问题通常非常有效

2014-09-09 22:57:58 740

原创 递归思想解决经典问题

递归是一个非常经典的算法思想,很多问题都可以采用递归来解决,特别是对于树、字符串这类本身就具有递归性质的数据结构相关的问题,下面就列出几个可以用递归来解决的经典问题:1. 字符串排列问题(不包含相同字符)该问题要求求出字符串的所有排列,我们可以循环遍历整个字符串,将每次循环遇到的字符和第一个位置的字符交换,然后求剩下字符串的所有排列;对于剩下的字符串,重复前面的过程,所以这是个递归的过

2014-09-09 21:05:30 962

原创 【字符串处理系列】最长回文子串

这是一道非常经典的字符串处理问题,最朴素

2014-09-09 10:36:48 508

原创 【字符串处理系列】最长重复子串

最长重复子串是指在字符串中中找出

2014-09-08 16:10:18 716

原创 求二叉树的深度

求二叉树的深度是在面试过程中经常会出现的一道经典题目,求解

2014-09-08 14:40:07 394

原创 【字符串处理系列】最长不重复子串

问题描述:最长不重复子串的目的是

2014-09-08 14:30:28 2094

原创 职责链模式(Chain of Responsibility)

职责链模式的意图:使多个对象都有机会处理请求

2014-09-08 11:25:11 535

原创 调停者模式(Mediator)

调停者模式的意图:定义一个对象,封装一组对象的交互,菜农个人

2014-09-07 20:47:25 828

原创 观察者模式(Observer)

观察者模式的意图是在多个对象之间定义一对多的依赖关系,当

2014-09-07 16:14:03 469

原创 单例模式(Singleton)

单例模式是一个在实际的项目中用的非常多

2014-09-07 14:26:11 464

原创 组合模式(Composite)

组合模式的意图:确保客户端调用单对象和组合对象的一致性

2014-09-07 13:41:32 441

verilog语言学习基础

verilog语言学习基础,非常经典的一本指导书,适用于初学者

2011-03-11

编译原理与实践课后习题答案 中文版

编译原理与实践课后习题答案中文版,机械工业出版社

2011-03-11

空空如也

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

TA关注的人

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