自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 175 1

原创 Leetcode 439. Ternary Expression Parser (递归,栈)

Leetcode 439. Ternary Expression Parser (递归,栈)

2016-10-23 14:34:11 1974

原创 2017微软秋季校园招聘在线编程笔试 Composition (DP)

2017微软秋季校园招聘在线编程笔试 1400 : Composition hihocoder

2016-10-12 13:33:44 1415

原创 Leetcode 379. Design Phone Directory

Leetcode 379. Design Phone Directory

2016-10-12 10:53:20 587

原创 Leetcode 254. Factor Combinations 找一个数的所有因子(Backtracking)

Leetcode 254. Factor Combinations 找一个数的所有因子(Backtracking)

2016-10-09 21:16:15 1238

原创 Leetcode 68. Text Justification (Airbnb面试题,字符串处理,边界条件)

Leetcode 68. Text Justification (Airbnb面试题,字符串处理,边界条件)

2016-10-08 11:07:34 1980

原创 Leetcode 294. Flip Game II (回溯,记忆化)

Leetcode 294. Flip Game II (回溯,记忆化)

2016-10-06 22:19:25 717

原创 Leetcode 247. Strobogrammatic Number II (数学,递归)

Leetcode 247. Strobogrammatic Number II (数学,递归)

2016-10-06 15:29:19 447

原创 Leetcode 265. Paint House II

Leetcode 265. Paint House II

2016-10-06 14:11:14 460

原创 Leetcode 276. Paint Fence (经典DP)

Leetcode 276. Paint Fence (经典DP)

2016-10-06 13:31:50 460

原创 Leetcode 317. Shortest Distance from All Buildings(多次BFS)

Leetcode 317. Shortest Distance from All Buildings

2016-10-06 12:59:44 484

原创 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 306

原创 Leetcode 286. Walls and Gates (Google面试题 BFS,记忆化搜索)

Leetcode 286. Walls and Gates (Google面试题 BFS,记忆化搜索)

2016-10-05 22:14:49 1297

原创 Leetcode 269. Alien Dictionary

Leetcode 269. Alien Dictionary

2016-10-05 18:24:29 361

原创 [Leetcode]330. Patching Array

[Leetcode]330. Patching Array

2016-10-04 21:30:56 284

原创 [Leetcode]388. Longest Absolute File Path

[Leetcode]388. Longest Absolute File Path

2016-10-04 19:26:33 390

原创 [Leetcode]376. Wiggle Subsequence

[Leetcode]376. Wiggle Subsequence

2016-10-04 16:58:36 360

原创 [Leetcode 375] Guess Number Higher or Lower II

[Leetcode 375] Guess Number Higher or Lower II

2016-10-04 16:07:21 460

原创 [Leetcode]386. Lexicographical Numbers

[Leetcode]386. Lexicographical Numbers

2016-10-04 07:47:44 429

原创 [Leetcode 399]Evaluate Division

[Leetcode 399]Evaluate Division

2016-10-03 20:27:39 516

原创 [Leetcode 411]Minimum Unique Word Abbreviation

[Leetcode 411]Minimum Unique Word Abbreviation

2016-10-03 19:57:48 2602 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 955

原创 [Leetcode]358. Rearrange String k Distance Apart (贪心,窗口,堆,字符)

[Leetcode]358. Rearrange String k Distance Apart (贪心,窗口,堆,字符)

2016-07-22 16:31:31 1624

原创 [hihoCoder太阁最新面经算法竞赛9] 题目一:Browser Caching (LRU缓存)

hihoCoder太阁最新面经算法竞赛9 题目一:Browser Caching (LRU缓存)

2016-07-18 18:48:13 855

原创 [hihoCoder太阁最新面经算法竞赛8]题目2 : Dice Possibility(简单记忆化搜索)

[hihoCoder太阁最新面经算法竞赛8]题目2 : Dice Possibility(简单记忆化搜索)

2016-07-17 11:09:40 541

原创 [2016 微软预科生计划-探星夏令营在线测试2] Give My Text Back(字符串处理)

2016 微软预科生计划-探星夏令营在线测试2 Give My Text Back(字符串处理)

2016-07-15 15:29:57 1192

原创 [hihoCoder太阁最新面经算法竞赛2] 岛屿 (DFS,Hash Function)

hihoCoder太阁最新面经算法竞赛2 岛屿

2016-07-15 11:14:10 747

原创 [hihoCoder太阁最新面经算法竞赛1] 穿越禁区 (DFS,并查集,计算几何) 难题

hihoCoder太阁最新面经算法竞赛1 穿越禁区

2016-07-15 10:05:42 739

原创 [hihoCoder 太阁最新面经算法竞赛6] 数组重排(N个数的最小公倍数)

hihoCoder太阁最新面经算法竞赛6

2016-07-13 11:24:10 728

原创 [Hihocoder]1335 : Email Merge (并查集)

Email Merge hihoCoder太阁最新面经算法竞赛7

2016-07-13 10:00:04 1458

原创 [Google 2017 Apac] Robot Rock Band

google 2017在线笔试 Robot Rock Band

2016-07-05 16:39:32 659

原创 [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 1053

原创 [2016 indeed笔试题] Tables and Pieces

[2016 indeed笔试题] Tables and Pieces

2016-07-03 21:45:45 1211 3

原创 Google 面试题

题目一  :题目就是给你一个matrix,里面的数字代表bar的高度,现在说降雨量如果高于bar的高度水可以漫过去,降雨量0开始每天+1这样,问最早第几天水可以有一条路径从src漫到dst。即 起点到终点的所有路径中,求路径最大点的最小值。解法: BFS+贪心。  从起点开始,把能 access 的点都加到一个 heap 中.每次取 heap 头,再把取到的点周围能 access 的都加进 h

2016-06-19 21:10:50 680

原创 [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 595

原创 [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 750

转载 ACM算法列表

ACM 所有算法数据结构栈,队列,链表哈希表,哈希数组堆,优先队列双端队列可并堆左偏堆二叉查找树Treap伸展树并查集集合计数问题二分图的识别平衡二叉树二叉排序树线段树一维线段树二维线段树树状数组一维树状数组N维树状数组字典树后缀数组,后缀树块状链表哈夫曼树桶,跳跃表Trie树(静态

2016-05-31 09:06:41 798

原创 [hihoCoder 1150] 基站选址(几何题,中心点)

描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在网格中建立基站的总代价是用户通讯代价的总和加上维护基站的代价,最小总代价。输入第一行为一个整数T,表示数据组数。每组数据第一

2016-04-14 17:18:39 626

原创 [hihoCoder 1149] 回文字符序列

描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组数据输出一行,格式为"Case #X: Y",X代表数据编号(从1开始)

2016-04-14 16:07:00 524

原创 [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 1003

空空如也

空空如也

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

TA关注的人

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