瀏覽代碼

add week 2 whiteboards

Froilan Miranda 6 年之前
父節點
當前提交
b66898e612
共有 1 個文件被更改,包括 22 次插入0 次删除
  1. 22
    0
      Week 2.md

+ 22
- 0
Week 2.md 查看文件

1
+## Week 1
2
+### Problem 1
3
+
4
+Write a Java program to insert an element (specific index and value) into an array. Shifting the rest of the elements to the right
5
+
6
+```
7
+Index : 2
8
+Value : 5
9
+Original Array : [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]                                                     
10
+New Array: [25, 14, 5, 56, 15, 36, 56, 77, 18, 29] 
11
+```
12
+
13
+### Problem 3
14
+
15
+Write a Java program to remove a specific element(by index) from an array.
16
+
17
+```
18
+Index : 1
19
+Original Array : [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]                                                     
20
+After removing the second element: [25, 56, 15, 36, 56, 77, 18, 29, 49, 49] 
21
+
22
+```