脸熟 Enterprise Engineer 伦敦店面过经

我4年经验

Technical Screen [ 45 minutes ] [ Time distribution I have written below is exact]

First 5 minutes - The interviewer introduced himself and explained what would be the format of the interview.
Next 5 minutes - I was expected to give a brief introduction about myself and not just iterate the CV. He was well versed with my current profile before hand.
Next 30 minutes - Coding

Question 1 -> Find the intersection of two sorted Arrays containing no duplicates. [I am aware of similar questions on LC but neitheris exact hence not including a link]
Answer -> O(n) time and O(1) space solution

Question 2 -> Find the intersection of two sorted arrays contain elements [ with duplicates] result containing duplicates as many time as in both arrays
Answer -> O(n) time and O(1) space solution

Question 2.1 -> Follow up for above question. Find intersection of two sorted array [ with duplicates] result should contain common elements as many times as its maximum frequency in either array.
a = [1,2,4,4,5] b= [4,4,4,5,6] then output = [4,4,4,5]
Answer -> O(n) time and O(1) space solution

Question 3 -> Verify Alien Dictionary. https://leetcode.com/problems/verifying-an-alien-dictionary/
Answer -> O(n * k) time and O(s) space where n = length or words, k = average length of each word, s = length of order

Question 3.1 -> Follow up for above question. Handle some charactes that you may encounter in a word but may not be in order of alphabets in which case ignore these characters and return if the list is sorted
Answer -> O(n * k) time and O(s) space where n = length or words, k = average length of each word, s = length of order. [Note] There are edge cases to consider.

Last 5 minutes -> We disussed about the role. He answered my questions.

报下我的

职位是 Enterprise Engineer
地点 London | Dublin

我9年工作经验

第一轮店面 Solved 2 questions with minor bugs.

  1. exact question https://leetcode.com/problems/valid-palindrome-ii/.
  2. varation of https://leetcode.com/problems/number-of-islands/. Instead return array of areas of islands. Island is connected in 4 directions (up, down, left, right). The same questions as in https://leetcode.com/discuss/interview-question/433502/Facebook-or-Phone-or-Number-of-Islands-and-Maximum-vacation-length.
    Interviewer asked about complexity and had followup question if the island is connected in 8 directions.