From a4b3c7d5bc61c34ec105bf108a4f1ec31fa15b25 Mon Sep 17 00:00:00 2001 From: DanXu007 <121884367+DanXu007@users.noreply.github.com> Date: Fri, 20 Jan 2023 23:06:07 -0500 Subject: [PATCH 1/5] Update README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa6584c9..ad3681f3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ Please contribute to this repository to help it make better. Any change like new * Install JDK8 https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html * Install Git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git * Install either Intellij https://www.jetbrains.com/idea/download/ -* If you like eclipse instead of intellij install eclipse https://eclipse.org/downloads/ + * If you like eclipse instead of intellij install eclipse https://eclipse.org/downloads/ +* Install PyCharm https://www.jetbrains.com/help/pycharm/installation-guide.html + * If you like Visual Studio instead install https://visualstudio.microsoft.com/

Set up your desktop

* Pull the git repository. Go to command line and type git clone https://github.com/mission-peace/interview.git @@ -25,3 +27,14 @@ Please contribute to this repository to help it make better. Any change like new * Go to any program and run that program * Go to any test and run the junit test. * Run ./gradlew build to create classes, run tests and create jar. + +

Tips and Tricks

+ +

Welcome!

+If you are a beginner to programming, welcome! All this code may seem daunting, but do not panic! Many of the programmers that you typically see online often have years of experience, so it is perfectly okay to get lost! Programming is a skill that needs to be built over time, no one magically becomes a good programmer. With that said, let's get started! + +

Starting out!

+Whether you are a brand new programmer or have minimal experience, this GitHub repository is designed to help you get better and improve your skills. Start with learning Python and checking out the Python folder. + +

Advanced Programmers!

+If you are an advanced programmer, check out the how to interview text file. This file will tell you what to expect for technical interviews, and how you can prepare for them. From b36836d8c9512c7740b38824080c32407e4056af Mon Sep 17 00:00:00 2001 From: DanXu007 <121884367+DanXu007@users.noreply.github.com> Date: Fri, 20 Jan 2023 23:14:26 -0500 Subject: [PATCH 2/5] Create InterviewExpectations.txt --- InterviewExpectations.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 InterviewExpectations.txt diff --git a/InterviewExpectations.txt b/InterviewExpectations.txt new file mode 100644 index 00000000..ae81d20e --- /dev/null +++ b/InterviewExpectations.txt @@ -0,0 +1,11 @@ +What is a technical interview? + +A technical interview is a job interview that is usually conducted by a company in the tech industry. These interviews will test your problem solving skills to see how you might fit in regards to a specific company. + +What questions can you expect? + +Although there are many types of technical interviews, the most basic and seen interviews are those that ask you to write code. Typically, you would be given 2-4 questions and a certain time limit to answer them. Note that you are expeceted to not finish all the problems, especially if you are given 4 questions. + +What programming topics are usually tested? + +Most of the companies that you might test for only require an intermediate understanding of a programming language of your choosing. Although there are manydifferent languages, these languages share common traits, and it will be these common traits that will be tested. This includes everything from strings and arrays to recursion and sorting algorithms. Again, the thing that companies are looking for isn't your coding knowledge, it's your ability to think and work your way through challenging obstacles in your path. From eac358c5952bf6396761acb48171ac0808141203 Mon Sep 17 00:00:00 2001 From: DanXu007 <121884367+DanXu007@users.noreply.github.com> Date: Fri, 20 Jan 2023 23:22:18 -0500 Subject: [PATCH 3/5] Create twosum.py --- python/array/twosum.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 python/array/twosum.py diff --git a/python/array/twosum.py b/python/array/twosum.py new file mode 100644 index 00000000..b53e031d --- /dev/null +++ b/python/array/twosum.py @@ -0,0 +1,8 @@ +class Solution: + def twoSum(self, nums: List[int], target: int) -> List[int]: + + d = {} + for i, j in enumerate(nums): + r = target - j + if r in d: return [d[r], i] + d[j] = i From 4ed3ce671ef6d3c2b31ed38a3840b0d78c202657 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 20 Jan 2023 23:28:39 -0500 Subject: [PATCH 4/5] Added mergeTwoLists.py --- python/linkedlist/mergeTwoLists.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 python/linkedlist/mergeTwoLists.py diff --git a/python/linkedlist/mergeTwoLists.py b/python/linkedlist/mergeTwoLists.py new file mode 100644 index 00000000..e69de29b From 5ed7d9ff7df25cbcbdd651e533833d52fbe586a6 Mon Sep 17 00:00:00 2001 From: DanXu007 <121884367+DanXu007@users.noreply.github.com> Date: Fri, 20 Jan 2023 23:29:28 -0500 Subject: [PATCH 5/5] Update mergeTwoLists.py --- python/linkedlist/mergeTwoLists.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/python/linkedlist/mergeTwoLists.py b/python/linkedlist/mergeTwoLists.py index e69de29b..0763f063 100644 --- a/python/linkedlist/mergeTwoLists.py +++ b/python/linkedlist/mergeTwoLists.py @@ -0,0 +1,15 @@ +class Solution: + def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]: + cur = dummy = ListNode() + while list1 and list2: + if list1.val < list2.val: + cur.next = list1 + list1, cur = list1.next, list1 + else: + cur.next = list2 + list2, cur = list2.next, list2 + + if list1 or list2: + cur.next = list1 if list1 else list2 + + return dummy.next