---
title: "Discussion on \"Sliding window without the guesswork\" | Hashnode"
description: "Discussion on \"Sliding window without the guesswork\". Sliding window turns \"check every subarray\" (O(n²)) into one pass (O(n)). Grow the window on the right, shrink it on the left, and keep state you can update in O(1).\n1. Spot it\nUse a sliding window wh"
url: "https://hashnode.com/posts/sliding-window-without-the-guesswork/6ad559466f3c3a1504546a9e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sliding window without the guesswork](https://basecase-utkarsh.hashnode.dev/sliding-window-without-the-guesswork?utm_source=hashnode&utm_medium=feed)

Sliding window turns "check every subarray" (O(n²)) into one pass (O(n)). Grow the window on the right, shrink it on the left, and keep state you can update in O(1). 1. Spot it Use a sliding window wh

Oct 18 · 3 min read · basecase-utkarsh.hashnode.dev  
Updated Nov 13  
Read the article

## Written by

[Utkarsh Shrivastava](https://hashnode.com/@utkarshinobi)

@utkarshinobi · San Francisco, USA

  
[View profile](https://hashnode.com/@utkarshinobi)

Algorithms, AI Engineering, Full Stack Systems

Code got cheap. Being right didn’t. Writing about AI engineering, distributed systems, algorithms, and product.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
