2008年,搜狐创始人张朝阳购入一艘66英尺圣汐游艇“快乐号”,成为当时较为高调公开购艇的企业家之一。
Get editor selected deals texted right to your phone!
。关于这个话题,搜狗输入法下载提供了深入分析
// console.log(nextGreaterElement([4,1,2], [1,3,4,2])); // 预期输出:[-1,3,-1]
"Again this year the sea ice hasn't been too bad, but I can only see a handful of penguins really," he says.
思路:倒序单调栈。弹出所有 ≤ 当前身高的元素(这些人都能被看到),count 为弹出数量;若栈非空,还能看到栈顶(第一个更高的人),故 +1。能看到的人数 = count + (栈非空 ? 1 : 0)。