这是一道非常高频,非常经典的题目: 首先分析下题意: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get ...
分类:
系统相关 时间:
2016-06-12 21:46:17
阅读次数:
156
1. 开闭原则(Open-Closed Principle,OCP) 1)定义:一个软件实体应当对扩展开放,对修改关闭( Software entities should be open for extension,but closed for modification.)。即在设计一个模块的时候, ...
分类:
其他好文 时间:
2016-06-12 20:07:20
阅读次数:
140
题目链接:https://leetcode.com/problems/merge-two-sorted-lists/
题目:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:
其他好文 时间:
2016-06-12 03:06:44
阅读次数:
164
题目链接:题目:
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the user’s news feed. Your design should suppo...
分类:
其他好文 时间:
2016-06-12 02:01:46
阅读次数:
180
Bitwise AND of Numbers Range
Total Accepted: 35825 Total
Submissions: 115763 Difficulty: Medium
Given a range [m, n] where 0
For example, given the range [5, 7], you should...
分类:
其他好文 时间:
2016-06-12 02:00:20
阅读次数:
113
背景描述 编程或者文档处理过程, 经常遇到需要将一个单词修改为另外一个单词的情况, 例如 命名为 shall 修改 为 should。 使用工具实现, 则比较方便,不容易出错, 解放双手。 需求规格 对于某个文件夹中的所有文本文件(txt), 将某个单词替换为目标单词。 实现思路 对于替换的单词映射... ...
分类:
其他好文 时间:
2016-06-11 22:50:33
阅读次数:
514
Q:
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire ...
分类:
编程语言 时间:
2016-06-11 18:57:56
阅读次数:
207
一、configure 报错 1、错误类型: Configure: error: Please reinstall the libcurl distribution-easy.h should be in <curl-dir>/include/curl/ 解决方法: sudo apt-get ins ...
分类:
Web程序 时间:
2016-06-11 13:07:25
阅读次数:
553
引言 用Qt程序在手机上显示一幅图片对编程人员来说是再基础不过的一件事情了。那么先让大家看两段代码: //dangerous should not be used, cannot display earth.png, //but if we change earth.png to a smaller ...
分类:
移动开发 时间:
2016-06-11 00:35:05
阅读次数:
427
How to compile mupdf-qt Compile on Linux You should install some tools and thirdparty libraries. For Ubuntu users, you can use the following command(s ...
分类:
系统相关 时间:
2016-06-10 17:38:47
阅读次数:
649