- 博客(86)
- 收藏
- 关注
原创 一道有趣的面试题
一道有趣的面试题:输入n。输出正三角形。如图:代码如下:递归const int MAX_SIZE=10;char pic_map[(1<<MAX_SIZE)+1][(2<<MAX_SIZE)+1];//以(x,y)为顶点画长度为2*n的正三角形。void print_triangle(int n, int x, int y) { ...
2019-11-25 17:06:53 227 1
原创 Leetcode 439. Ternary Expression Parser (递归,栈)
Leetcode 439. Ternary Expression Parser (递归,栈)
2016-10-23 14:34:11 2009
原创 2017微软秋季校园招聘在线编程笔试 Composition (DP)
2017微软秋季校园招聘在线编程笔试 1400 : Composition hihocoder
2016-10-12 13:33:44 1442
原创 Leetcode 379. Design Phone Directory
Leetcode 379. Design Phone Directory
2016-10-12 10:53:20 605
原创 Leetcode 254. Factor Combinations 找一个数的所有因子(Backtracking)
Leetcode 254. Factor Combinations 找一个数的所有因子(Backtracking)
2016-10-09 21:16:15 1273
原创 Leetcode 68. Text Justification (Airbnb面试题,字符串处理,边界条件)
Leetcode 68. Text Justification (Airbnb面试题,字符串处理,边界条件)
2016-10-08 11:07:34 2021
原创 Leetcode 247. Strobogrammatic Number II (数学,递归)
Leetcode 247. Strobogrammatic Number II (数学,递归)
2016-10-06 15:29:19 455
原创 Leetcode 317. Shortest Distance from All Buildings(多次BFS)
Leetcode 317. Shortest Distance from All Buildings
2016-10-06 12:59:44 499
原创 Leetcode 246. Strobogrammatic Number
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).Write a function to determine if a number is strobogrammatic. The number is represented as a
2016-10-06 12:22:39 321
原创 Leetcode 286. Walls and Gates (Google面试题 BFS,记忆化搜索)
Leetcode 286. Walls and Gates (Google面试题 BFS,记忆化搜索)
2016-10-05 22:14:49 1323
原创 [Leetcode]388. Longest Absolute File Path
[Leetcode]388. Longest Absolute File Path
2016-10-04 19:26:33 422
原创 [Leetcode 375] Guess Number Higher or Lower II
[Leetcode 375] Guess Number Higher or Lower II
2016-10-04 16:07:21 493
原创 [Leetcode]386. Lexicographical Numbers
[Leetcode]386. Lexicographical Numbers
2016-10-04 07:47:44 459
原创 [Leetcode 411]Minimum Unique Word Abbreviation
[Leetcode 411]Minimum Unique Word Abbreviation
2016-10-03 19:57:48 2648 1
原创 [Google Round A APAC 2017] Problem B. Rain
google 2017笔试 [Google Round A APAC 2017] Problem B. Rain
2016-08-27 18:56:00 990
原创 [Leetcode]358. Rearrange String k Distance Apart (贪心,窗口,堆,字符)
[Leetcode]358. Rearrange String k Distance Apart (贪心,窗口,堆,字符)
2016-07-22 16:31:31 1657
原创 [hihoCoder太阁最新面经算法竞赛9] 题目一:Browser Caching (LRU缓存)
hihoCoder太阁最新面经算法竞赛9 题目一:Browser Caching (LRU缓存)
2016-07-18 18:48:13 884
原创 [hihoCoder太阁最新面经算法竞赛8]题目2 : Dice Possibility(简单记忆化搜索)
[hihoCoder太阁最新面经算法竞赛8]题目2 : Dice Possibility(简单记忆化搜索)
2016-07-17 11:09:40 568
原创 [2016 微软预科生计划-探星夏令营在线测试2] Give My Text Back(字符串处理)
2016 微软预科生计划-探星夏令营在线测试2 Give My Text Back(字符串处理)
2016-07-15 15:29:57 1228
原创 [Google APAC 2017] Lazy Spelling Bee
ProblemIn the Lazy Spelling Bee, a contestant is given a target word W to spell. The contestant's answer word A is acceptable if it is the same length as the target word, and the i-th letter of A is
2016-07-05 15:00:19 1067
原创 Google 面试题
题目一 :题目就是给你一个matrix,里面的数字代表bar的高度,现在说降雨量如果高于bar的高度水可以漫过去,降雨量0开始每天+1这样,问最早第几天水可以有一条路径从src漫到dst。即 起点到终点的所有路径中,求路径最大点的最小值。解法: BFS+贪心。 从起点开始,把能 access 的点都加到一个 heap 中.每次取 heap 头,再把取到的点周围能 access 的都加进 h
2016-06-19 21:10:50 693
原创 [Google电面] String decompression
Google电面 string decompressionProblem Description input output2[abc]3[a]c => abcabcabcaaac; 2[ab3[d]]2[cc] => abdddabdddcc
2016-06-19 19:26:59 613
原创 [Practice Round APAC test 2016]Problem A. Bad Horse(Google 2016笔试题)
ProblemAs the leader of the Evil League of Evil, Bad Horse has a lot of problems to deal with. Most recently, there have been far too many arguments and far too much backstabbing in the League, so m
2016-06-04 17:23:53 763
转载 ACM算法列表
ACM 所有算法数据结构栈,队列,链表哈希表,哈希数组堆,优先队列双端队列可并堆左偏堆二叉查找树Treap伸展树并查集集合计数问题二分图的识别平衡二叉树二叉排序树线段树一维线段树二维线段树树状数组一维树状数组N维树状数组字典树后缀数组,后缀树块状链表哈夫曼树桶,跳跃表Trie树(静态
2016-05-31 09:06:41 806
原创 [hihoCoder 1150] 基站选址(几何题,中心点)
描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在网格中建立基站的总代价是用户通讯代价的总和加上维护基站的代价,最小总代价。输入第一行为一个整数T,表示数据组数。每组数据第一
2016-04-14 17:18:39 635
原创 [hihoCoder 1149] 回文字符序列
描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组数据输出一行,格式为"Case #X: Y",X代表数据编号(从1开始)
2016-04-14 16:07:00 532
原创 [Hihocoder 1289] 403 Forbidden (微软2016校园招聘4月在线笔试)
Little Hi runs a web server. Sometimes he has to deny access from a certain set of malicious IP addresses while his friends are still allow to access his server. To do this he writes N rules in the co
2016-04-09 09:47:48 1056
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人