Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4100e3d

Browse files
Move code example in code snippet block
1 parent 11d4309 commit 4100e3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Sliding Window Pattern
22

33
Caculating something with the contiguous sub array or sub list of a given size "k".
4-
4+
```js
55
[7, 43, 4, 6, 8, 11, 2]
66
[i j] --> Sliding Window ([7, 43, 4, 6]) of size "4".
7-
7+
```
88
Everytime we slide this window, remove first element (7) from calculation and add next element (6) in the calculation and window.
99

1010
* When size of sliding window in not fixed.
@@ -14,4 +14,4 @@ These elements constitute our sliding window.
1414

1515
After this, we will keep adding one element in sliding window in a stepwise fashion.
1616

17-
We will shrink the window from the beginning.
17+
We will shrink the window from the beginning.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /