由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 一个Google面试题
相关主题
求助一道FB的高频题non-overlap jobs面试题-牙签压线的几率
问问题一道面试题, 挺难的, 求助
请问一道面试题问道面试题:android lock screen combinations
问道看到的面试题问一道面试题
大家看看这几道google面试题怎么做?问一道glassdoor上面的面试题
急问一个面试题,不知该如何回答?请高人给个思路!谢谢!internship overlap period (转载)
请教一道面试题问个算法题, 关于区间 overlap的
做了一个中文版careercup求overlap的rectagales
相关话题的讨论汇总
话题: score话题: end话题: start话题: scores话题: substring
进入JobHunting版参与讨论
1 (共1页)
h***o
发帖数: 1494
1
Input:
1. an array of characters
2. a bunch of scores, for each
a. start (start position in the array)
b. end (end position in the array)
c. score (score is not related to the content of the substring or
length of the substring)
Scores could be overlapped.
Output:
all scores (there is no overlap on them) that have the maximum sum.
For example
Input:
"abcdedfhijk"
start: 1 end: 3 score: 5
start: 0 end: 10 score: 8
start: 5 end:6 score 4
Output:
start: 1 end: 3 score: 5
start: 5 end:6 score 4
Provide algorithm which is not brute force.
x***y
发帖数: 633
2
This is the same as the job selection DP problem, first sort according to
the end time, and then DP.
p********7
发帖数: 549
3
没看懂题,不知道string和答案有什么关系
h***o
发帖数: 1494
4

每一个substring有一个score, 但是substring 会overlap。找出所有的不overlap的
substring, 使得他们的sum of scores 最大。

【在 p********7 的大作中提到】
: 没看懂题,不知道string和答案有什么关系
E********a
发帖数: 124
5
I think so

【在 x***y 的大作中提到】
: This is the same as the job selection DP problem, first sort according to
: the end time, and then DP.

h***o
发帖数: 1494
6
有Link吗?
b********h
发帖数: 119
7
http://pages.cs.wisc.edu/~shuchi/courses/787-F09/scribe-notes/lec3.pdf

【在 h***o 的大作中提到】
: 有Link吗?
h**6
发帖数: 4160
h***o
发帖数: 1494
9

这题属于什么难度呀?

【在 h**6 的大作中提到】
: http://www.facebook.com/careers/puzzles.php?puzzle_id=15
a*******8
发帖数: 2299
10
背包问题。
1 (共1页)
进入JobHunting版参与讨论
相关主题
求overlap的rectagales大家看看这几道google面试题怎么做?
Facebook online challenge急问一个面试题,不知该如何回答?请高人给个思路!谢谢!
Apple iCloud 电面请教一道面试题
longest overlap suffix做了一个中文版careercup
求助一道FB的高频题non-overlap jobs面试题-牙签压线的几率
问问题一道面试题, 挺难的, 求助
请问一道面试题问道面试题:android lock screen combinations
问道看到的面试题问一道面试题
相关话题的讨论汇总
话题: score话题: end话题: start话题: scores话题: substring