由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 借人气,问道题
相关主题
leetcode container with most water求最大值的问题,很弱,轻拍,多谢各位大神了!
leetcode一道题面试题
leetcode的container with most water题来问一个关于smart pointer的弱问题
也发个A家电面经Google Onsite Interview
遍寻OJ的答案到处都没有,不知道大牛可以不可以发个自己的答案请教大家一道Google的题目
求解。。。请问一道面试题
问道面试题请教一个Axis-Aligned Rectangles的算法
问道题CLRS interval tree 的两道练习题
相关话题的讨论汇总
话题: 160话题: rectangle话题: returns话题: 111话题: around
进入JobHunting版参与讨论
1 (共1页)
d******0
发帖数: 191
1
Draw as few as possible rectangle to cover all 1. Each rectangle can not
contain 2.
    
{".........."
,".........."
,".........."
,".1.1.1...."
,".........."
,".1.1.1...."
,".......2.."
,".1.1.1...."
,"........1."
,".........."}
Returns: 2
A selection rectangle can be drawn around the block of 9 1s, and then
another one around only the isolated 1:
..........
..........
|-----|...
|1.1.1|...
|.....|...
|1.1.1|...
|.....|2..
|1.1.1||-|
|-----||1|
.......|-|
1)
    
{".........."
,".........."
,".........."
,"..111....."
,"..121....."
,"..111....."
,".........."
,".........."
,".........."
,".........."}
Returns: 4
2)
    
{".........."
,".1....1..."
,"..2......."
,"...1.1...."
,"....2....1"
,".....1..2."
,"..1......."
,".......1.."
,".2........"
,"....111..."}
Returns: 4
我的想法是 把每一个“1”点 digest出来 而后dp 最少的rectangle。不知怎么record
.想乱了。。。
d******0
发帖数: 191
2
还是没想出来,自己顶
1 (共1页)
进入JobHunting版参与讨论
相关主题
CLRS interval tree 的两道练习题遍寻OJ的答案到处都没有,不知道大牛可以不可以发个自己的答案
问个老算法题求解。。。
求overlap的rectagales问道面试题
问道G题(2)问道题
leetcode container with most water求最大值的问题,很弱,轻拍,多谢各位大神了!
leetcode一道题面试题
leetcode的container with most water题来问一个关于smart pointer的弱问题
也发个A家电面经Google Onsite Interview
相关话题的讨论汇总
话题: 160话题: rectangle话题: returns话题: 111话题: around