⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠

Excalidraw Data

Text Elements

5

6

7

1

2

3

4

0 1 2 3 4 5 6

Initial position of value in array,

Final position of value in array,

0 1 2 3 4 5 6

1

2

3

4

5

6

7

i

i+k

similarly for index i= 6

1

2

3

4

5

6

7

0 1 2 3 4 5 6

Final position of value in array,

5

6

7

1

2

3

4

i=6

i+k would lead to array out of bounds or in simpler terms we would go outside the array

0 1 2 3 4 5 6