Skip to content

Commit 4f9f3f9

Browse files
committed
Removed Flutter Code
1 parent da96d77 commit 4f9f3f9

File tree

1,063 files changed

+38
-32504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,063 files changed

+38
-32504
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
*
3+
* You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than the other, append the additional letters onto the end of the merged string.
4+
* Return the merged string.
5+
*/
6+
7+
function mergeAlternately(word1: string, word2: string): string {
8+
// w1 = abc
9+
// w2 = pqr
10+
// apbqcr
11+
// w1 = '', w2= pqr, vv
12+
// w1 = a, w2 = poi => apoi
13+
// w1 = ab, w2 = pqrst =? a p b q r s t
14+
// w1 = abcdefgh, w2 = pqr => a p b q c r d e f g h...
15+
// Two Pointer Approach?
16+
let res = ''; // Space: O(n+m)
17+
18+
let i = 0;
19+
let j = 0;
20+
const word1Len = word1.length;
21+
const word2Len = word2.length;
22+
while (i < word1Len && j < word2Len) {
23+
res += word1[i] + word2[i];
24+
i++;
25+
j++;
26+
}
27+
28+
while (i < word1Len) {
29+
res += word1[i];
30+
i++;
31+
}
32+
while (j < word2Len) {
33+
res += word2[j];
34+
j++;
35+
}
36+
37+
return res;
38+
};

flutter-learnings/bloc_learning/cubit_learning/.gitignore

Lines changed: 0 additions & 44 deletions
This file was deleted.

flutter-learnings/bloc_learning/cubit_learning/flutter_bloc_concept/android/.gradle/7.5/dependencies-accessors/gc.properties

Whitespace-only changes.

0 commit comments

Comments
 (0)