Commit 26209cb
committed
feat: Implement insertion in an array by shifting elements to the right
🧠 Logic:
- Initializes an integer array and inserts a new element at a specific index.
- Elements from the insertion point onward are shifted one position to the right.
- The new element is placed at the desired index.
- Demonstrates a classic array insertion algorithm with manual element shifting.
Signed-off-by: Somesh diwan <[email protected]>1 parent 9431399 commit 26209cb
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
41 | 60 | | |
0 commit comments