🔴 Google Coding Interview with ex-Facebook ex-Stanford Co-Founder || Software Engineering Interview

preview_player
Показать описание

Have you ever wondered how Google Interviews work?
Would you like to watch how Rachit might perform in a real life Coding Interview?

Had a 45 minute fun mock interview session with Ankush Singla! This is our first collaboration together and we hope you all enjoy the video 😁
#SoftwareEngineering #Google #CodingInterview

𝗦𝗢𝗖𝗜𝗔𝗟 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦

𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧 𝗣𝗟𝗔𝗬𝗟𝗜𝗦𝗧𝗦

𝗣𝗥𝗢𝗚𝗥𝗔𝗠𝗠𝗜𝗡𝗚 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
Рекомендации по теме
Комментарии
Автор

He just solved 2 random interview questions with such speed and clarity in 40 mins 🙏🏻
It takes me 40 mins to make the mindset of coming out of my bed and write code.

antonygouton
Автор

I take a lot of time in coming up with good variable names is a perfect way of saying don't judge me based on variable names 😄

mayurbhor
Автор

Alternative simpler breakdown:

Get the longest increasing subsequence (one pass) ...
- 5, 8, 14

Then find the intermediate sums in next iteration like (one pass) ...
- 4, 5, 0, 8, 22, 14, 0
- 2, 5, 13, 8, 24, 14, 33

Add the max of intermediate values (one pass) ...
- 4, 5, 13, 8, 24, 14, 33

soumyajitdas
Автор

Finally I understood Im way back in this competitive world 😢

AvinashJ
Автор

The first question can be done in O(n) time and O(1) space using two pointers approach. Something similar to that of merging two sorted arrays. I've myself coded this problem and works completely fine.

namangupta
Автор

Rachit no doubt you did this great. But this maximise sum question would require only single iteration O(n). As the arrays are sorted, we can iterate through the arrays and maintain the sum to each array till any intersection.

sum_a and sum_b, where we would check on interesection, if(sum_a > sum_b) max += sum_a else max += sumb

Like this. and we would keep on working on working on these sum_a and sum_b till intersection and then resetting them to 0. This is how the question would not require the DP.

wisdomcoder
Автор

Bro please please do more of these kind of videos. It seriously helped me a lot. Thank you once again. And yes, You're a genius!! Your approach makes the problem look easy. Great!

shashankbarole
Автор

in first question you can just use two pointer starting from both array start if and increment the pointer if that element is smaller than other and just keep on adding the elements while you move when the two pointer's become same it means its an intersection now just take max of both sums and make both sums 0 O(N) time and O(1) space

mrakkbr
Автор

He is happy listening to 2 nd question because he has solved it on leetcode LOL 😂..

adityakharat
Автор

Ankush sir is my favorite teacher and always help me , 😍😍

Rahulmishra-ivdt
Автор

the second question based on words that can be generated through keypad one is the most common question and most of us has already came across that one

akshun
Автор

Amazing mock interview 😃
I myself have learned a lot from Ankush. Best mentor ever❤️

parikhjain
Автор

This was dope ! The way you interacted (while thinking behind the scenes) was truly commendable :) Learnt a lot again ❤

arihannnt
Автор

This is also working perfectly fine, right ?
No dynamic programming and recursion required
def maxSum(a, b):
# O(m+n)
intersection = set(a) & set(b)
n, m = len(a), len(b)
max_sum = sum(intersection)
i, j = 0, 0
sumA, sumB = -1, -1
while sumA or sumB:
sumA, sumB = 0, 0
while i < n:
if a[i] in intersection:
i += 1
break
sumA += a[i]
i += 1
while j < m:
if b[j] in intersection:
j += 1
break
sumB += b[j]
j += 1
max_sum += max(sumB, sumA)
return max_sum

bhavyarajdev
Автор

I have just started coding and I thought of this solution:

Why not just create a code that compares the sums between each switch and on that basis decides whether to make a switch or not

mk_
Автор

Sir is standing whole time during the interview, that's the kind of hardwork and patience is needed and its quite good for health.

bitcoder
Автор

I think the first question can be done in O(n) time and O(1) space and the second question can be done iteratively using queues.

AnuragSingh
Автор

Ankush Sir is great teacher, mentor. He could make hard questions looks easier..Really love his teaching style

ashishpradhan
Автор

@Rachit This is my python one liner 😎 :

one_liner = lambda rec_str, digits: rec_str if digits%10 <= 0 else " ".join(list(map(lambda i: one_liner(i + rec_str, digits // 10), my_dict[digits%10])))

we just need a dictionary, my_dict, mapping numbers to list of corresponding characters and then we are good to go.

ambarishkapil
Автор

One warning:
Questions featured in the video are just for illustration and bear no resemblance with the level of problems, actually asked.
The purpose of the video is just to demonstrate how to communicate yourself and manage your time.

saurabhsharma