使用Python3的数据结构和算法
This is my repository for Data Structures And Algorithm using Python3. This repository mainly aims at implementation of various Data Structures and Algorithm techniques. 拉维·帕巴里(Ravi Pabari) 亦称龙战士Fell free to contribute in other lang
剑指Offer(Python多种思路实现):队列的最大值
面试59题:
题目:队列的最大值。
题目一:滑动窗口的最大值。
给定一个数组和滑动窗口的大小,请找出所有滑动窗口里的最大值。例如:如果输入数组为[2,3,4,2,6,2,5,1]及滑动窗口大小为3,那么一共存在6个滑动窗口,它们的最大值分别为[4,4,6,6,6,5]
解题思路一:Python的方法。
class Solution:
def maxInWindows(self, num, size):
if n