摘要: 题目:给定一个数组和滑动窗口的大小,找出所有滑动窗口里数值的最大值。例如,如果输入数组{2,3,4,2,6,2,5,1}及滑动窗口的大小3,那么一共存在6个滑动窗口,他们的最大值分别为{4,4,6,6,6,5};针对数组{2,3,4,2,6,2,5,1}的滑动窗口有以下6个:{[2,3,4],2,6... 阅读全文
posted @ 2015-05-06 23:45 AndyJee 阅读(9138) 评论(1) 推荐(2) 编辑
摘要: There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following req... 阅读全文
posted @ 2015-05-06 20:17 AndyJee 阅读(1550) 评论(0) 推荐(0) 编辑