From 8cc92d0bd494f33e734436fd3cc8018833c8b792 Mon Sep 17 00:00:00 2001 From: AmiyahJo <86239804+AmiyahJo@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:05:50 -0400 Subject: [PATCH 1/6] Create README.md Accidentally removed my work the 1st time by merging --- lesson_00/amiyahjones/README.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lesson_00/amiyahjones/README.md diff --git a/lesson_00/amiyahjones/README.md b/lesson_00/amiyahjones/README.md new file mode 100644 index 000000000..14fc62d70 --- /dev/null +++ b/lesson_00/amiyahjones/README.md @@ -0,0 +1,43 @@ +# Mya.README + ```Javascript +const Mya = class SoftwareEngineer { + intern(code, tools) { + self.code = Javascript, HTML, CSS, Java; + self.tools = React, Docker; + } +}; + +// Intrested in bringing ideas to life within a web browser. +// Learning how websites become quick, responsive, and accesssible to everyone. +``` + + + +### ☴ My work hours +9AM-5PM I'm an early bird and often begin the day with a head start of my work. Feel free to reach me by email during this time, and I'll get back to you as soon as I'm able! + +### What's the best way to communicate with me? .☘︎ ݁˖ +Private message through google chat works perfectly. Email works too as a follow up or if I happened to miss one of your messages. +> [!TIP] +> _In case I don't respond:_ Ping me again on google chat or send me another email! + +### I'd be happy to help you with ꒰ ﹍ ꒱ +* Code suggestions +* Explain or understand a code snippet +* Photos + design ideas + +## Extra ⓘ +* ✦ procreate artist ↓
+ - I like to combine my art and code together! + - In case you find me with my ipad, that's why +* visual learner
+* Jr Developer HS Intern for 4 years with Code Differently (youth program) +* No, I don't drink coffee. ~~Hot chocolate is my go to~~ + +> I'm the type of person that if you ask me a question and I don't know the answer, I'm gonna tell you that I don't know. But I bet you what, I know how to find the answer and I will find the answer.
- Will smith + + +###### // readme inspired by [Kaeti's repo][kaeti-repo] , code snippet inspired by [Thai Brega] + +[kaeti-repo]: https://github.com/kaeti/personal-readme +[Thai brega]: https://github.com/Thaiane/Thaiane From 50b18619d9de9203384f678c1e0eee84a70510a0 Mon Sep 17 00:00:00 2001 From: AmiyahJo <86239804+AmiyahJo@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:07:22 -0400 Subject: [PATCH 2/6] Delete lesson_00/amiyahjones/README.md --- lesson_00/amiyahjones/README.md | 43 --------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 lesson_00/amiyahjones/README.md diff --git a/lesson_00/amiyahjones/README.md b/lesson_00/amiyahjones/README.md deleted file mode 100644 index 14fc62d70..000000000 --- a/lesson_00/amiyahjones/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Mya.README - ```Javascript -const Mya = class SoftwareEngineer { - intern(code, tools) { - self.code = Javascript, HTML, CSS, Java; - self.tools = React, Docker; - } -}; - -// Intrested in bringing ideas to life within a web browser. -// Learning how websites become quick, responsive, and accesssible to everyone. -``` - - - -### ☴ My work hours -9AM-5PM I'm an early bird and often begin the day with a head start of my work. Feel free to reach me by email during this time, and I'll get back to you as soon as I'm able! - -### What's the best way to communicate with me? .☘︎ ݁˖ -Private message through google chat works perfectly. Email works too as a follow up or if I happened to miss one of your messages. -> [!TIP] -> _In case I don't respond:_ Ping me again on google chat or send me another email! - -### I'd be happy to help you with ꒰ ﹍ ꒱ -* Code suggestions -* Explain or understand a code snippet -* Photos + design ideas - -## Extra ⓘ -* ✦ procreate artist ↓
- - I like to combine my art and code together! - - In case you find me with my ipad, that's why -* visual learner
-* Jr Developer HS Intern for 4 years with Code Differently (youth program) -* No, I don't drink coffee. ~~Hot chocolate is my go to~~ - -> I'm the type of person that if you ask me a question and I don't know the answer, I'm gonna tell you that I don't know. But I bet you what, I know how to find the answer and I will find the answer.
- Will smith - - -###### // readme inspired by [Kaeti's repo][kaeti-repo] , code snippet inspired by [Thai Brega] - -[kaeti-repo]: https://github.com/kaeti/personal-readme -[Thai brega]: https://github.com/Thaiane/Thaiane From 6e709a2d2de25ebcb64a9fa3b96a04d9a6fd00b9 Mon Sep 17 00:00:00 2001 From: AmiyahJo Date: Fri, 18 Oct 2024 20:33:39 +0000 Subject: [PATCH 3/6] feat: adds answer to leetcode 1929 copy & paste solution made from leetcode where I originally submitted --- .../java/com/codedifferently/lesson11/Lesson11.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java index 248938a96..5b2025e66 100644 --- a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java +++ b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java @@ -9,7 +9,16 @@ public class Lesson11 { * https://leetcode.com/problems/concatenation-of-array */ public int[] getConcatenation(int[] nums) { - return null; + int n = nums.length; + + int[] ans = new int[2 * n]; + + for(int i = 0; i < n; i++){ + ans[i] = nums[i]; + ans[i + n] = nums[i]; + } + + return ans; } /** From 15e1f1316d2c2216a06547cb83a6e8af77ded38f Mon Sep 17 00:00:00 2001 From: AmiyahJo Date: Fri, 18 Oct 2024 20:52:56 +0000 Subject: [PATCH 4/6] feat: adds leetcode 2942 answer provided I've already submitted on leetcode, I brought it over to vscode now --- .../java/com/codedifferently/lesson11/Lesson11.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java index 5b2025e66..a0413f8e9 100644 --- a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java +++ b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java @@ -1,5 +1,6 @@ package com.codedifferently.lesson11; +import java.util.ArrayList; import java.util.List; public class Lesson11 { @@ -26,6 +27,13 @@ public int[] getConcatenation(int[] nums) { * https://leetcode.com/problems/find-words-containing-character/ */ public List findWordsContaining(String[] words, char x) { - return null; + List indices = new ArrayList<>(); + + for (int i = 0; i < words.length; i++){ + if(words[i].indexOf(x) >= 0){ + indices.add(i); + } + } + return indices; } } From d6d05f5b3e68df2b0cd5e1b076550fc85649c9bb Mon Sep 17 00:00:00 2001 From: AmiyahJo Date: Fri, 18 Oct 2024 20:53:17 +0000 Subject: [PATCH 5/6] chore: remove comments --- .../main/java/com/codedifferently/lesson11/Lesson11.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java index a0413f8e9..e03c34c3b 100644 --- a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java +++ b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java @@ -5,10 +5,6 @@ public class Lesson11 { - /** - * Provide the solution to LeetCode 1929 here: - * https://leetcode.com/problems/concatenation-of-array - */ public int[] getConcatenation(int[] nums) { int n = nums.length; @@ -22,10 +18,6 @@ public int[] getConcatenation(int[] nums) { return ans; } - /** - * Provide the solution to LeetCode 2942 here: - * https://leetcode.com/problems/find-words-containing-character/ - */ public List findWordsContaining(String[] words, char x) { List indices = new ArrayList<>(); From 349f96094df899b8264a95e68da671c3d61da8d3 Mon Sep 17 00:00:00 2001 From: AmiyahJo Date: Fri, 18 Oct 2024 21:05:52 +0000 Subject: [PATCH 6/6] fix: instructions provided by github to run a gradle check used the ./gradlew :arrays_app:spotlessApply as reccommended. --- .../codedifferently/lesson11/Lesson11.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java index e03c34c3b..ac3787485 100644 --- a/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java +++ b/lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java @@ -6,26 +6,26 @@ public class Lesson11 { public int[] getConcatenation(int[] nums) { - int n = nums.length; + int n = nums.length; - int[] ans = new int[2 * n]; + int[] ans = new int[2 * n]; - for(int i = 0; i < n; i++){ - ans[i] = nums[i]; - ans[i + n] = nums[i]; - } - - return ans; + for (int i = 0; i < n; i++) { + ans[i] = nums[i]; + ans[i + n] = nums[i]; + } + + return ans; } public List findWordsContaining(String[] words, char x) { List indices = new ArrayList<>(); - for (int i = 0; i < words.length; i++){ - if(words[i].indexOf(x) >= 0){ - indices.add(i); - } - } - return indices; + for (int i = 0; i < words.length; i++) { + if (words[i].indexOf(x) >= 0) { + indices.add(i); + } + } + return indices; } }