Coding Interview Workshop
HTML-код
- Опубликовано: 29 сен 2024
- Coding interview workshop given at Le Wagon coding boot camp in Lisbon. We first go though a short introduction and then see 4 simple coding puzzles.
Git hub link: github.com/cut...
Solutions for the above are under the branch "solutions"
Please support me through my Udemy courses:
Multithreading in,
Go Lang: www.udemy.com/...
Python: www.udemy.com/...
Java: www.udemy.com/...
Pass your coding interview in,
Java : www.udemy.com/...
Python: www.udemy.com/...
Ruby: www.udemy.com/...
JavaScript: www.udemy.com/...
Learn Dynamic Programming in,
Java: www.udemy.com/...
Python: www.udemy.com/...
Ruby: www.udemy.com/...
Python code for the array rotation:
Solution 1 :
def rotate(a, k):
n = len(a)
i = 1
while (i
Good job, i appreciate what you collect and transferred ur knowledge
Python 3 code for the first problem:
def is_anagram(s, t):
worddict = {}
for schar in s:
if schar in worddict:
worddict[schar] = worddict[schar] + 1
else:
worddict[schar] = 1
for tchar in t:
if tchar in worddict:
worddict[tchar] = worddict[tchar] - 1
if(worddict[tchar] == 0):
del worddict[tchar]
if bool(worddict):
return False
else:
return True
Ruby code for the first problem:
def is_anagram(s, t)
s.chars.sort == t.chars.sort
end
The questions are not very clear in this video.