上一页 1 2 3 4 5 6 7 8 ··· 11 下一页

2017年1月21日

锁 和 CopyOnWrite的实现

摘要: 1.普通锁 只有lock功能, Java实现:ReentrantLock lock = new ReentrantLock(); lock和unlock: 2.读写锁 读写锁:分为读锁和写锁,多个读锁不互斥,读锁与写锁互斥。 总之,读的时候上读锁,写的时候上写锁! Java里面的实现:Reentra 阅读全文

posted @ 2017-01-21 23:14 BYRHuangQiang 阅读(1702) 评论(0) 推荐(0) 编辑

2015年10月15日

leetcode面试准备: Maximal Rectangle

摘要: leetcode面试准备: Maximal Rectangle === 1 题目 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return... 阅读全文

posted @ 2015-10-15 17:29 BYRHuangQiang 阅读(378) 评论(0) 推荐(0) 编辑

leetcode面试准备: Game of Life

摘要: leetcode面试准备: Game of Life === 1 题目 According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devi... 阅读全文

posted @ 2015-10-15 12:29 BYRHuangQiang 阅读(1074) 评论(0) 推荐(0) 编辑

2015年10月7日

leetcode面试准备: Word Pattern

摘要: leetcode面试准备: Word Pattern === 1 题目 Given a pattern and a string str, find if str follows the same pattern. Examples: Notes: patterncontains onl... 阅读全文

posted @ 2015-10-07 16:29 BYRHuangQiang 阅读(1446) 评论(0) 推荐(0) 编辑

2015年9月14日

leetcode面试准备:Add and Search Word - Data structure design

摘要: leetcode面试准备:Add and Search Word Data structure design === 1 题目 Design a data structure that supports the following two operations: search(word) c... 阅读全文

posted @ 2015-09-14 11:16 BYRHuangQiang 阅读(653) 评论(0) 推荐(0) 编辑

leetcode面试准备:Reverse Words in a String

摘要: leetcode面试准备:Reverse Words in a String === 1 题目 Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", ... 阅读全文

posted @ 2015-09-14 10:26 BYRHuangQiang 阅读(393) 评论(0) 推荐(0) 编辑

2015年9月12日

leetcode面试准备:Implement Trie (Prefix Tree)

摘要: leetcode面试准备:Implement Trie (Prefix Tree) === 1 题目 Implement a trie with , , and methods. Note: You may assume that all inputs are consist of lowerc... 阅读全文

posted @ 2015-09-12 15:48 BYRHuangQiang 阅读(413) 评论(0) 推荐(0) 编辑

leetcode面试准备:Triangle

摘要: leetcode面试准备:Triangle === 1 题目 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row... 阅读全文

posted @ 2015-09-12 12:20 BYRHuangQiang 阅读(310) 评论(0) 推荐(0) 编辑

2015年9月11日

leetcode面试准备:Sliding Window Maximum

摘要: leetcode面试准备:Sliding Window Maximum === 1 题目 Given an array nums, there is a sliding window of size k which is moving from the very left of the array... 阅读全文

posted @ 2015-09-11 17:16 BYRHuangQiang 阅读(1014) 评论(0) 推荐(0) 编辑

leetcode面试准备:Simplify Path

摘要: leetcode面试准备:Simplify Path === 1 题目 Given an absolute path for a file (Unix style), simplify it. For example, path = "/home/", = "/home" path = "/a... 阅读全文

posted @ 2015-09-11 15:55 BYRHuangQiang 阅读(410) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 11 下一页

导航