File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11 Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 5
5
6
6
public class Lesson11 {
7
7
8
-
9
8
public int [] getConcatenation (int [] nums ) {
10
- int [] answer = new int [2 * nums .length ];
9
+ int [] answer = new int [2 * nums .length ];
11
10
12
- for (int i = 0 ; i < nums .length ;i ++) {
11
+ for (int i = 0 ; i < nums .length ; i ++) {
13
12
answer [i ] = nums [i ];
14
- answer [i + nums .length ] = nums [i ];
13
+ answer [i + nums .length ] = nums [i ];
15
14
}
16
15
return answer ;
17
16
}
18
-
17
+
19
18
public List <Integer > findWordsContaining (String [] words , char x ) {
20
19
List answer = new ArrayList ();
21
- for (int i = 0 ; i < words .length ;i ++){
22
- if (words [i ].indexOf (x )!= -1 ){
20
+ for (int i = 0 ; i < words .length ; i ++) {
21
+ if (words [i ].indexOf (x ) != -1 ) {
23
22
answer .add (i );
24
23
}
25
24
}
26
25
return answer ;
27
26
}
28
27
}
29
-
You can’t perform that action at this time.
0 commit comments