上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页

2015年6月4日

Maximal Square

摘要: Maximal Square问题:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.思路: 动态规划我的代码:public... 阅读全文

posted @ 2015-06-04 10:44 zhouzhou0615 阅读(292) 评论(0) 推荐(0) 编辑

2015年6月3日

(转)二叉树分类

摘要: 转自:http://blog.csdn.net/brillianteagle/article/details/39118937一、完全二叉树的判断参考:http://blog.csdn.net/lilypp/article/details/6158699/【分析】根节点开始进行层次遍历,节点入队列,... 阅读全文

posted @ 2015-06-03 09:25 zhouzhou0615 阅读(232) 评论(0) 推荐(0) 编辑

2015年6月2日

Dungeon Game

摘要: Dungeon Game问题:The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N room... 阅读全文

posted @ 2015-06-02 22:10 zhouzhou0615 阅读(243) 评论(0) 推荐(0) 编辑

(转)Boyer-Moore算法

摘要: 转自:Boyer-Moore算法一.简述 在当前用于查找子字符串的算法中,BM(Boyer-Moore)算法是当前有效且应用比较广的一中算法,各种文本编辑器的“查找”功能(Ctrl+F),大多采用Boyer-Moore算法。比我们在学习的KMP算法快3~5倍。 Boyer-Moore算法... 阅读全文

posted @ 2015-06-02 10:47 zhouzhou0615 阅读(345) 评论(0) 推荐(0) 编辑

2015年6月1日

散列表

摘要: 散列表实现的方法最主要的有两种。一、拉链法二、线性探测法最基本的Put和get操作(注意:内存中是并行的数组,一条保存Keys 一条保存values)线性探测法比较麻烦的是删除操作,代码如下resize操作 阅读全文

posted @ 2015-06-01 15:54 zhouzhou0615 阅读(177) 评论(0) 推荐(0) 编辑

Add and Search Word - Data structure design

摘要: Add and Search Word - Data structure design问题:Design a data structure that supports the following two operations:void addWord(word)bool search(word)se... 阅读全文

posted @ 2015-06-01 09:59 zhouzhou0615 阅读(343) 评论(0) 推荐(0) 编辑

2015年5月31日

Contains Duplicate II

摘要: Contains Duplicate II问题:Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnu... 阅读全文

posted @ 2015-05-31 21:33 zhouzhou0615 阅读(234) 评论(0) 推荐(0) 编辑

Word Search II

摘要: Word Search II问题:Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of s... 阅读全文

posted @ 2015-05-31 16:33 zhouzhou0615 阅读(247) 评论(0) 推荐(0) 编辑

2015年5月29日

Implement Trie (Prefix Tree)

摘要: Implement Trie (Prefix Tree)问题:Implement a trie withinsert,search, andstartsWithmethods.思路: 前缀树我的代码:class TrieNode { // Initialize your data struc... 阅读全文

posted @ 2015-05-29 16:17 zhouzhou0615 阅读(294) 评论(0) 推荐(0) 编辑

2015年5月28日

(转)多进程 & 多线程的区别与适用场景

摘要: 转自:http://www.cnblogs.com/huntfor/p/4021327.html关于多进程和多线程,教科书上最经典的一句话是“进程是资源分配的最小单位,线程是CPU调度的最小单位”,这句话应付考试基本上够了,但如果在工作中遇到类似的选择问题,那就没有这么简单了,选的不好,会让你深受其... 阅读全文

posted @ 2015-05-28 22:03 zhouzhou0615 阅读(516) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页

导航