Bläddra i källkod

add week three questions

Froilan Miranda 6 år sedan
förälder
incheckning
910b15c51d
2 ändrade filer med 28 tillägg och 3 borttagningar
  1. 3
    3
      Week 2.md
  2. 25
    0
      Week 3.md

+ 3
- 3
Week 2.md Visa fil

1
-## Week 1
1
+## Week 2
2
 ### Problem 1
2
 ### Problem 1
3
 
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
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
 Index : 2
7
 Index : 2
8
 Value : 5
8
 Value : 5
9
 Original Array : [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]                                                     
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
 ### Problem 2
13
 ### Problem 2
17
 ```
17
 ```
18
 Index : 1
18
 Index : 1
19
 Original Array : [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]                                                     
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 Visa fil

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
+```