Google Statistical Coding & Algorithms Mock Interview

  Рет қаралды 15,558

Jay Feng

Jay Feng

3 жыл бұрын

Today I am interviewing Dan, a machine learning and data engineer, on a common statistical coding and machine learning interview question around calculating medians from a stream of numbers.
Here's the question we're tackling: www.interviewquery.com/questi...
Want to be featured in the next mock interview video? Apply here: airtable.com/shrdQrwKK7xxGLm6l
👉 Subscribe to my data science channel: bit.ly/2xYkyUM
🔥 Get 10% off machine learning interview prep: www.interviewquery.com/pricin...
❓ Check out our ML interview course: www.interviewquery.com/course...
🔑 Get professional coaching here: www.interviewquery.com/coachi...
🐦 Follow us on Twitter: / interview_query
Follow Jay on:
Twitter: / datasciencejay
LinkedIn: / jay-feng-ab66b049
Related Links:
Google machine learning engineer interview profile: www.interviewquery.com/interv...
Google data scientist interview: www.interviewquery.com/blog-t...
Google Data Scientist skills profile: www.interviewquery.com/interv...

Пікірлер: 22
@juntaoxie7067
@juntaoxie7067 2 жыл бұрын
isn't that insert for method 1 is O(n) instead of O(log n)? since slicing is O(n)
@Sn-nw6zb
@Sn-nw6zb 2 жыл бұрын
Just use two heaps, left heap for lower numbers and right heap for higher numbers. And then you can make sure insert complexity would be O(log n)
@consistentthoughts826
@consistentthoughts826 3 жыл бұрын
I performed well in a case study discussion for a small startup after watching these sessions Thank you very much
@omkarsunthankar2061
@omkarsunthankar2061 2 жыл бұрын
Use two heaps min heap of all max values and max heap of all min values. Getting media. Is 0(1)
@kshitizkhatri9733
@kshitizkhatri9733 3 жыл бұрын
This was pretty good quality development and debugging. Loved the test driven development approach here.
@qz1771
@qz1771 2 жыл бұрын
I'm guessing the best answer would be a self-balancing binary search tree
@basicmaths3443
@basicmaths3443 2 жыл бұрын
my interview is for 1 hr, if i take 34 min in solving a median question then ?
@mdazimulhaque
@mdazimulhaque 2 жыл бұрын
Great interview. Just a question though. Are statistical coding questions limited to Google or other companies also ask it in data science interviews?
@iqjayfeng
@iqjayfeng 2 жыл бұрын
They’re pretty common across many data science interviews because of their two birds one stone approach.
@mdazimulhaque
@mdazimulhaque 2 жыл бұрын
@@iqjayfeng thank you for answering!
@basicmaths3443
@basicmaths3443 2 жыл бұрын
Can I solve like this? Will the interviewer like my this solution?? lst= [ ] def median_cal(lst): print("The original list : " ,lst) lst.sort() n = len(lst) print("sorted list : ", lst) med_index = n//2 m = (lst[med_index-1]+lst[med_index])/2 if (n%2 != 0): print("Median : ", lst[med_index]) else: print("Median : ", m) return
@LifeofTF
@LifeofTF 3 жыл бұрын
Any BF deals for interview query?
@venkatnetha8382
@venkatnetha8382 3 жыл бұрын
For a 1200 long pages of question bank on real world scenarios to make you think like a data scientist. please visit: payhip.com/b/ndY6 You can download the sample pages so as to see the quality of the content.
@spicytuna08
@spicytuna08 2 жыл бұрын
I got this. would this satisfy the question? def calculateMedian1(list1): list1.sort() listSize = len(list1) medianIndex = int(listSize/2) median = list1[medianIndex] if listSize % 2 == 0: otherMedianIndex = medianIndex - 1 median = (median + list1[otherMedianIndex])/2 return median
@basicmaths3443
@basicmaths3443 2 жыл бұрын
I solved like this. You need to pass a list as argument in the function. lst= [ ] def median_cal(lst): print("The original list : " ,lst) lst.sort() n = len(lst) print("sorted list : ", lst) med_index = n//2 m = (lst[med_index-1]+lst[med_index])/2 if (n%2 != 0): print("Median : ", lst[med_index]) else: print("Median : ", m) return
@pigdogcheap1773
@pigdogcheap1773 2 жыл бұрын
I think he's confusing the Median with something else. A median should be a number in the given array . 2.5 and 5.t that he mentioned in both examples aren't the medians
@TpBrass0
@TpBrass0 2 жыл бұрын
Ugly code…
@mingunpak1786
@mingunpak1786 3 жыл бұрын
I don't think he can actually pass the interview.
@purnawirmanhuang5145
@purnawirmanhuang5145 3 жыл бұрын
agreed, he start coding before he explains, which is a big no no
@Hassan.Wahba.97
@Hassan.Wahba.97 2 жыл бұрын
@@purnawirmanhuang5145 The algorithm was also all over the place. It could have been way much easier... he needs some software engineering classes to start with.
@yawninglion
@yawninglion Жыл бұрын
I would fail him too. 1. He apparently didn't consider using heaps. 2. The way he handles bad input is dangerous. When the class is provided with bad input, simply returning none silently makes debugging hard.
@harshmankodiya9397
@harshmankodiya9397 11 ай бұрын
Thanks for confirming I don't have to watch the while vdo no😅😅
Spotify Data Scientist Business Case Interview
28:40
Jay Feng
Рет қаралды 15 М.
Machine Learning Interview Questions
6:37
Jay Feng
Рет қаралды 38 М.
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 137 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 6 МЛН
Google Machine Learning System Design Mock Interview
25:18
Jay Feng
Рет қаралды 50 М.
7 Types of Machine Learning Interview Questions!
13:14
Jay Feng
Рет қаралды 9 М.
Square Machine Learning Interview: Decision Tree Bank Loan
25:07
Google Coding Interview With A Facebook Software Engineer
49:59
Clément Mihailescu
Рет қаралды 924 М.
A/B Testing Interview with a Google Data Scientist
13:06
Jay Feng
Рет қаралды 33 М.
Amazon Data Science Interview: Linear Regression
23:09
Exponent
Рет қаралды 18 М.
Google Data Scientist Algorithmic Coding Interview
22:57
Jay Feng
Рет қаралды 32 М.
5 Concepts in Statistics You Should Know | Data Science Interview
20:48
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 4 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 3,9 МЛН
Какой ПК нужен для Escape From Tarkov?
0:48
CompShop Shorts
Рет қаралды 272 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2 МЛН
🔥Идеальный чехол для iPhone! 📱 #apple #iphone
0:36
Не шарю!
Рет қаралды 1,3 МЛН