---
title: "Discussion on \"Sliding Window :\" | Hashnode"
description: "Discussion on \"Sliding Window :\". find a max sum of subarray of size k{3 here}.\nExample :\n1) arr[] : {3,2,4,5,2,1,1,1,1,3,3} , sum = 5, k = 2:\noutput : [4,5] = 9\nclass Sliding{\n    int findMax(int arr[], int k, int size){\n        int i = 0; \n        int j = 0;\n        int sum = 0;\n  ..."
url: "https://hashnode.com/posts/sliding-window/641b03c18e270d517501620f"
---

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

Discussion

# [Sliding Window :](https://abhishek.me/sliding-window?utm_source=hashnode&utm_medium=feed)

find a max sum of subarray of size k{3 here}. Example : 1) arr\[\] : {3,2,4,5,2,1,1,1,1,3,3} , sum = 5, k = 2: output : \[4,5\] = 9 class Sliding{ int findMax(int arr\[\], int k, int size){ int i = 0; int j = 0; int sum = 0; ...

Mar 22, 2023 · 1 min read · abhishek.me  
Read the article

-   [#sliding-window](https://hashnode.com/tag/sliding-window)
-   [#array-methods](https://hashnode.com/tag/array-methods)
-   [#java](https://hashnode.com/tag/java)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#algorithms](https://hashnode.com/tag/algorithms)

## Written by

[Abhishek Kumar Sharma](https://hashnode.com/@abhishekcrj27)

@abhishekcrj27 · West Bengal, India

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

I do DSA in java and a MERN-stack developer. I am lazy so I create RESTful APIs.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
