File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 33 * https://leetcode.com/problems/concatenation-of-array
44 */
55export function getConcatenation ( nums : number [ ] ) : number [ ] {
6- const answer : number [ ] = new Array ( 2 * nums . length ) ;
6+ const answer : number [ ] = new Array ( 2 * nums . length ) ;
77 for ( let i = 0 ; i < nums . length ; i ++ ) {
88 answer [ i ] = nums [ i ] ;
99 answer [ i + nums . length ] = nums [ i ] ;
@@ -17,14 +17,13 @@ export function getConcatenation(nums: number[]): number[] {
1717 * https://leetcode.com/problems/find-words-containing-character/
1818 */
1919export function findWordsContaining ( words : string [ ] , x : string ) : number [ ] {
20- const result : number [ ] = [ ] ;
2120
21+ const result : number [ ] = [ ] ;
2222 for ( let i = 0 ; i < words . length ; i ++ ) {
2323 if ( words [ i ] . indexOf ( x ) !== - 1 ) {
2424 result . push ( i ) ;
2525 }
2626 }
27-
2827 return result ;
2928}
3029
You can’t perform that action at this time.
0 commit comments