由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 问个题
相关主题
请教careercup上的一道题Google onsite问题
career cup 上9.4题答案是否正确Maximum Sum of Increasing Sequence
请教 Cracking the Coding Interview 上一道题这道题DP怎么做阿
关于搭人梯那道题,careercup上面的答案错的吧dp problem on mit
Cracking Ed4里的9.7 答案有错吗?那个leetcode上头得distinct subsequence什么意思
再来cc150一问leetcode一题没看明白
问个题,bt中找最大的bst面试题count # of increasing subsequences of String求解
careerup 150 上一道题 答案没看懂?求解这个动态规划题
相关话题的讨论汇总
话题: person话题: tower话题: input话题: circus话题: output
进入JobHunting版参与讨论
1 (共1页)
P*******b
发帖数: 1001
1
A circus is designing a tower routine consisting of people standing atop one
another’s
shoulders. For practical and aesthetic reasons, each person must be both sho
rter and lighter than the person below him or her. Given the heights and wei
ghts of each person in the circus, write a method to compute the largest pos
sible number of peoplein such a tower.
EXAMPLE:
Input (ht, wt): (65, 100) (70, 150) (56, 90) (75, 190) (60, 95) (68, 110)
Output: The longest tower is length 6 and includes from top
l******c
发帖数: 2555
2
longest increasing subsequence
I**A
发帖数: 2345
3
from career-cup
Let’s assume the following input: (65, 100) (70, 150) (56, 90) (64,140) (75
, 190) (60, 95) (68,
110).
Since we know that each person must be shorter and lighter than the person
below him/her,
we will sort our input based on either weight or height.
Let’s assume that we have sorted our input based on height:
(56, 90) (60, 95) (64, 140) (65, 100) (68, 110) (70, 150) (75, 190)
Now we know that our output should be a subsequence (may not be contiguous
but should
have same relative o
1 (共1页)
进入JobHunting版参与讨论
相关主题
求解这个动态规划题Cracking Ed4里的9.7 答案有错吗?
大家帮忙解释一个 LeetCode DP (distinct subsequences)再来cc150一问
Question on leetcode Distinct Subsequences问个题,bt中找最大的bst
花了一上午把get all palindromic subsequences debug完了careerup 150 上一道题 答案没看懂?
请教careercup上的一道题Google onsite问题
career cup 上9.4题答案是否正确Maximum Sum of Increasing Sequence
请教 Cracking the Coding Interview 上一道题这道题DP怎么做阿
关于搭人梯那道题,careercup上面的答案错的吧dp problem on mit
相关话题的讨论汇总
话题: person话题: tower话题: input话题: circus话题: output