注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
Round 1 Technical Interview
Maximum of Minimums of Every Window
给定一个大小为 n 的数组 A 和一个整数 x,需要实现以下算法步骤:
1. 考虑每一个长度为 x 的连续子数组(即滑动窗口)。
2. 找出每个窗口中的最小值。
3. 返回所有这些最小值中的最大值。
例如:A = [1, 3, -1, 5, 3, 6] pid
1 NULL
2 1
3 1
4 2
预期输出结果:
1 -> Root
2 -> Inner
3 -> Leaf
4 -> Leaf |