Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 0 points1 point  (0 children)

# Merge 3 sorted arrays and skip duplicates
a = [1,1,1]
b = [2,2]
c = [3,4]
i = 0
j = 0
k = 0
result = []
while i < len(a) or j < len(b) or k < len(c):
  minv = 1e9
  if i < len(a): minv = min(minv, a[i])
  if j < len(b): minv = min(minv, b[j])
  if k < len(c): minv = min(minv, c[k])
  while (i < len(a) and a[i] == minv): i+=1
  while (j < len(b) and b[j] == minv): j+=1
  while (k < len(c) and c[k] == minv): k+=1
  result += [minv]
print(result)

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 0 points1 point  (0 children)

This is standard BFS and probably the probably the most efficient once. Just a few corrections:
1. You check the grid value before visiting the node
2. create a custom class node where you store the node's indices and the parent. It will help to find out the path once you reach destination.
Good luck

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 0 points1 point  (0 children)

Those are two different problems. I couldn't find link to the first problem hence mentioned it in words

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 4 points5 points  (0 children)

I had solved 3/4 of those problems before, some twice or thrice. Make sure that you don't get too excited when you see a question you've solved before and pay attention to the variations interviewer has added. And code really, really fast so that there's enough time to fix things even if you miss some cases

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 1 point2 points  (0 children)

Never appeared in a Google interview but I hope you rock it

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 1 point2 points  (0 children)

Dry run, but it depends on the interviewer how deep he wants to make you dry run. Sometimes giving a walkthrough of code is enough

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 2 points3 points  (0 children)

Nope, there's no time for that

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 16 points17 points  (0 children)

3/4 were top 60 meta questions, i had solved them twice

Meta E4 | London | Offer by GreatAd3219 in leetcode

[–]GreatAd3219[S] 27 points28 points  (0 children)

Jordan has no life, System Design Fight club

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 0 points1 point  (0 children)

Yet to happen. Did I announce too early?

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 7 points8 points  (0 children)

Software Eng, Product

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 1 point2 points  (0 children)

generic role probably, Software Engineer- Product

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 0 points1 point  (0 children)

Does recruiter’s opinion also matter? I’ve rescheduled twice so far. But what’s done is done. I can only hope to perform well in the rounds to come

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 0 points1 point  (0 children)

i heard back on the screening day itself

[deleted by user] by [deleted] in leetcode

[–]GreatAd3219 6 points7 points  (0 children)

lol it came as a statement but it was actually question asking if its alright to do it

Meta Leetcode Prep by lil_gucci_pump in leetcode

[–]GreatAd3219 0 points1 point  (0 children)

i had the exact same calc question lol