Skip to content

Commit 1da1169

Browse files
Chris WuChris Wu
Chris Wu
authored and
Chris Wu
committed
no message
1 parent 19f4cba commit 1da1169

6 files changed

+112
-18
lines changed

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,38 +149,31 @@ This [list](https://docs.google.com/spreadsheets/d/1SbpY-04Cz8EWw3A_LBUmDEXKUMO3
149149
## Overall Mindset
150150
1. Having a right mindset is the most important one. It keeps you going when you are tired after work. Studying when everyone else are out having fun. Reminding you that your goals are not going to come easy, it takes time, self-discipline, mental and physical toughness...
151151

152-
2. This is a speech from Sean Lee on "How to Get a Job at the Big 4". I highly recommend this because it gives me the right mindset on how to put in the work.
153-
<https://youtu.be/YJZCUhxNCv8>
152+
2. This is a speech from Sean Lee on [How to Get a Job at the Big 4](https://youtu.be/YJZCUhxNCv8). I highly recommend this because it gives me the right mindset on how to put in the work.
154153

155-
3. CS DoJo on "How I Got a Job at Google as a Software Engineer". There are also lots of technique on coding interview in his channel.
156-
<https://www.youtube.com/watch?v=UPO-9iMjBpc>
154+
3. CS DoJo on [How I Got a Job at Google as a Software Engineer](https://www.youtube.com/watch?v=UPO-9iMjBpc). There are also lots of technique on coding interview in his channel.
157155

158-
4. The #1 Daily Habit of Those Who Dominate with Andy Frisella (Also on Spotify or Youtube, just google it.)
159-
<https://podcasts.apple.com/tw/podcast/the-mfceo-project/id1012570406?i=1000412624447>
156+
4. [The #1 Daily Habit of Those Who Dominate with Andy Frisella](https://podcasts.apple.com/tw/podcast/the-mfceo-project/id1012570406?i=1000412624447) (Also on Spotify or Youtube, just google it.)
160157

161158
## Prepare in a Structural Way
162-
1. <https://www.quora.com/How-should-I-prepare-for-my-Google-interview-if-I-have-1-month-left-and-I%E2%80%99m-applying-for-a-software-engineer-role/answer/Anthony-D-Mays?ch=10&share=5c488000&srid=W0jqp>
159+
1. [How should I prepare for my Google interview if I have 1 month left and I’m applying for a software engineer role?](https://www.quora.com/How-should-I-prepare-for-my-Google-interview-if-I-have-1-month-left-and-I%E2%80%99m-applying-for-a-software-engineer-role/answer/Anthony-D-Mays?ch=10&share=5c488000&srid=W0jqp)
163160

164-
2. <https://www.quora.com/How-can-I-get-a-job-at-Facebook-or-Google-in-6-months-I-need-a-concise-work-plan-to-build-a-good-enough-skill-set-Should-I-join-some-other-start-up-or-build-my-own-projects-start-up-Should-I-just-focus-on-practicing-data-structures-and-algorithms/answer/Jimmy-Saade>
161+
2. [How can I get a job at Facebook or Google in 6 months? I need a concise work-plan to build a good enough skill set. Should I join some other start-up or build my own projects/start-up? Should I just focus on practicing data structures and algorithms?](https://www.quora.com/How-can-I-get-a-job-at-Facebook-or-Google-in-6-months-I-need-a-concise-work-plan-to-build-a-good-enough-skill-set-Should-I-join-some-other-start-up-or-build-my-own-projects-start-up-Should-I-just-focus-on-practicing-data-structures-and-algorithms/answer/Jimmy-Saade)
165162

166-
3. <https://www.quora.com/What-should-I-know-from-the-CLRS-3rd-edition-book-if-my-aim-is-to-get-into-Google/answer/Jimmy-Saade>
163+
3. [What should I know from the CLRS 3rd edition book if my aim is to get into Google?](https://www.quora.com/What-should-I-know-from-the-CLRS-3rd-edition-book-if-my-aim-is-to-get-into-Google/answer/Jimmy-Saade)
167164

168-
## I Know Nothing About Data Structures and Algorithms
165+
## Data Structures and Algorithms for beginners
169166
If you are new or know nothing about data structures and algorithms, I recommend [this course](<https://classroom.udacity.com/courses/ud513>). This course is taught in Python and design to help you find job and do well in the interview.
170167

171168

172169
# System Design
173-
1. More resource
174-
<https://github.com/shashank88/system_design>
170+
1. [More resource](https://github.com/shashank88/system_design)
175171

176-
2. Architecture 101
177-
<https://engineering.videoblocks.com/web-architecture-101-a3224e126947>
172+
2. [Architecture 101](https://engineering.videoblocks.com/web-architecture-101-a3224e126947)
178173

179-
3. How to scale up? There are also lots of tech interview related topic in his channel.
180-
<https://www.youtube.com/watch?v=yPF94QiI2qk&t=385s>
174+
3. [How to scale up?](https://www.youtube.com/watch?v=yPF94QiI2qk&t=385s) There are also lots of tech interview related topic in his channel.
181175

182-
4. Narendra talks about many system design.
183-
<https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA/playlists>
176+
4. [Narendra's Youtube Channel](https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA/playlists)
184177

185178

186179
# Knowledge Base Question
@@ -228,3 +221,7 @@ If you are new or know nothing about data structures and algorithms, I recommend
228221
## Interview Question Survey
229222
<https://www.glassdoor.com/index.htm>
230223
<https://www.careercup.com/>
224+
225+
## Offer Negotiation
226+
<https://haseebq.com/my-ten-rules-for-negotiating-a-job-offer/>
227+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class Solution(object):
2+
def diffWaysToCompute(self, S):
3+
def calculate(operator, n1, n2):
4+
if operator=="+":
5+
return n1+n2
6+
elif operator=='-':
7+
return n1-n2
8+
elif operator=='*':
9+
return n1*n2
10+
else:
11+
return None
12+
13+
if S.isdigit(): return [int(S)]
14+
15+
opt = []
16+
for i in xrange(len(S)):
17+
if S[i]=='+' or S[i]=='-' or S[i]=='*':
18+
left = self.diffWaysToCompute(S[:i])
19+
right = self.diffWaysToCompute(S[i+1:])
20+
for n1 in left:
21+
for n2 in right:
22+
opt.append(calculate(S[i], n1, n2))
23+
return opt

problems/palindrome-partitioning.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Solution(object):
2+
def partition(self, S):
3+
def isPalindrome(s):
4+
return len(s)==1 or (len(s)>0 and s==s[::-1])
5+
def search(s, pal_list):
6+
if len(s)==0:
7+
opt.append(pal_list)
8+
return
9+
for i in xrange(1, len(s)+1):
10+
if isPalindrome(s[:i]):
11+
search(s[i:], pal_list+[s[:i]])
12+
opt = []
13+
search(S, [])
14+
return opt
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Solution(object):
2+
def canPartitionKSubsets(self, nums, k):
3+
def search(subs):
4+
if not nums: return True
5+
n = nums.pop()
6+
for i, sub in enumerate(subs):
7+
if sub+n<=target:
8+
subs[i]+=n
9+
if search(subs): return True
10+
subs[i]-=n
11+
if not sub: break
12+
nums.append(n)
13+
return False
14+
15+
if sum(nums)%k!=0: return False
16+
target = sum(nums)/k
17+
nums.sort()
18+
return search([0]*k)

problems/restore-ip-addresses.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Solution(object):
2+
def restoreIpAddresses(self, s):
3+
def search(digit, ip):
4+
if len(ip)==4:
5+
if len(digit)==0: opt.append(ip)
6+
return
7+
8+
for i in xrange(1, len(digit)+1):
9+
num = int(digit[:i])
10+
if 0<=num and num<=255 and len(digit[:i])==len(str(num)):
11+
search(digit[i:], ip+[digit[:i]])
12+
opt = []
13+
search(s, [])
14+
return ['.'.join(ip) for ip in opt]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class Solution(object):
2+
def splitIntoFibonacci(self, S):
3+
def findIndex(s, num):
4+
for i, c in enumerate(num):
5+
if i>=len(s): break
6+
if c!=s[i]: break
7+
if i==len(num)-1: return i+1
8+
return -1
9+
10+
def search(fab, s):
11+
if len(s)==0: return fab
12+
if len(fab)<2: return []
13+
14+
target = fab[-1]+fab[-2]
15+
if target>2147483648: return []
16+
i = findIndex(s, str(target))
17+
if i>0: return search(fab+[target], s[i:])
18+
return []
19+
20+
for i in xrange(1, len(S)-2):
21+
for j in xrange(i+1, len(S)-1):
22+
#skip leading zero
23+
if (S[:i][0]!='0' and S[:i][0]=='0') or (S[i:j][0]!='0' and S[i:j][0]=='0'): continue
24+
opt = search([int(S[:i]), int(S[i:j])], S[j:])
25+
if len(opt)>0: return opt
26+
return []
27+
28+

0 commit comments

Comments
 (0)