File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11 Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ public class Lesson11 {
1010 * https://leetcode.com/problems/concatenation-of-array
1111 */
1212 public int [] getConcatenation (int [] nums ) {
13- int n = nums .length ;
14- int [] ans = new int [n * 2 ];
15- for (int i = 0 ; i < n ; i ++){
16- ans [i ] = nums [i ];
17- ans [i + n ] = nums [i ];
13+ int n = nums .length ;
14+ int [] ans = new int [n * 2 ];
15+ for (int i = 0 ; i < n ; i ++) {
16+ ans [i ] = nums [i ];
17+ ans [i + n ] = nums [i ];
1818 }
1919 return ans ;
2020 }
@@ -24,12 +24,12 @@ public int[] getConcatenation(int[] nums) {
2424 * https://leetcode.com/problems/find-words-containing-character/
2525 */
2626 public List <Integer > findWordsContaining (String [] words , char x ) {
27- ArrayList <Integer > result = new ArrayList <>();
27+ ArrayList <Integer > result = new ArrayList <>();
2828
29- for (int i = 0 ; i < words .length : i ++) {
30- if (words [i ].indexOf (x ) != -1 ) {
29+ for (int i = 0 ; i < words .length ; i ++) {
30+ if (words [i ].indexOf (x ) != -1 ) {
3131 result .add (i );
32- }
32+ }
3333 }
3434 return result ;
3535 }
You can’t perform that action at this time.
0 commit comments