Browse Source

add week three questions

Froilan Miranda 6 years ago
parent
commit
910b15c51d
2 changed files with 28 additions and 3 deletions
  1. 3
    3
      Week 2.md
  2. 25
    0
      Week 3.md

+ 3
- 3
Week 2.md View File

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

+ 25
- 0
Week 3.md View File

@@ -0,0 +1,25 @@
1
+## Week 3
2
+### Problem 1
3
+
4
+Write a Java program to find the maximum and minimum value of an array.
5
+
6
+```
7
+Original Array: [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]
8
+Maximum value for the above array = 77
9
+Minimum value for the above array = 14
10
+```
11
+
12
+### Problem 2
13
+
14
+Write a Java program to find the duplicate values of an array of integer values.
15
+
16
+Input:
17
+```
18
+Input Array : [1, 2, 5, 5, 6, 6, 7, 2]
19
+```
20
+Output:
21
+```
22
+Duplicate Element : 2
23
+Duplicate Element : 5
24
+Duplicate Element : 6
25
+```