Leetcode Problem Based On Sliding Filament