---
title: "Comment by yetanothertroll on \"Sliding Window Algorithm\" | Hashnode"
description: "The maximum subarray sum with one deletion does not appear to be faster than O(n²) even using sliding window. I can almost but not quite grasp a &quot;dynamic p"
url: "https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94/comment/646d97d6aa3b783ef11a8406"
---

[Discussion](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94)

Comment [Sliding Window Algorithm](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94)

[yetanothertroll](https://hashnode.com/@yetanothertroll)

[May 24, 2023](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94/comment/646d97d6aa3b783ef11a8406)

The maximum subarray sum with one deletion does not appear to be faster than O(n²) even using sliding window. I can almost but not quite grasp a "dynamic programming" approach to speed it up aargh

[Austin](https://hashnode.com/@austn)

[May 24, 2023](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94/comment/646d97d6aa3b783ef11a8406#reply-646e24dcb16e4c4af29109f0)

I think if you're reaching an O(n^2) solution, something must be going wrong.

Good luck though, if it can be done in BASIC, you're the one to figure it out!

[yetanothertroll](https://hashnode.com/@yetanothertroll)

[May 25, 2023](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94/comment/646d97d6aa3b783ef11a8406#reply-646eb0bd5bd7d54f0c7ea330)

[Austin](https://hashnode.com/@austn) I think I can once I understand Kaldane's algorithm thoroughly. :)

[yetanothertroll](https://hashnode.com/@yetanothertroll)

[May 30, 2023](https://hashnode.com/posts/sliding-window-algorithm/645879ac911934ba87f23b94/comment/646d97d6aa3b783ef11a8406#reply-647564aa731d78b677df6b43)

[Austin](https://hashnode.com/@austn) My stabs at the leetcode problems can be found here [forums.craigslist.org](https://forums.craigslist.org/?forumID=9510)
