We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67d6e0d commit d657b4eCopy full SHA for d657b4e
lesson_11/arrays_ts/src/lesson11.ts
@@ -3,13 +3,19 @@
3
* https://leetcode.com/problems/concatenation-of-array
4
*/
5
export function getConcatenation(nums: number[]): number[] {
6
- return [];
+ return [...nums, ...nums];
7
}
8
9
/**
10
* Provide the solution to LeetCode 2942 here:
11
* https://leetcode.com/problems/find-words-containing-character/
12
13
export function findWordsContaining(words: string[], x: string): number[] {
14
+ const results: number[] = [];
15
+ for (let i = 0; i < words.length; i++) {
16
+ if (words[i].includes(x)) {
17
+ results.push(i);
18
+ }
19
20
+ return results;
21
0 commit comments