Amazon | FEE | Phone Screen | Rejected
Anonymous User
1129

Hello,

The interview was for 60 minutes in 3 parts:

  • 10 min - Introduction and asking questions in the end.
  • 20 min - Behavioral questions and leadership principles.
  • 30 min - Coding questions.

Leadership principles questions were focusing on customer obsession, ownership and invent and simplify.

Coding questions were 2 related questions:

First, he asked to write a function to return all elements with same attribute from domtree. Example:

Input: findAllEle('color', '#fff');
Output: Array of elements matching this color

I have suggested BFS and DFS and implmented BFS as both has same time and space complexity for this question.

He asked for edge cases and that led to 2nd question which is if some elements has color as white or #ffffff not #fff. How can we find them also.

I suggested to create a function with dictonary which checks #fff and unify the value to be always in lowercase color name like white.

He said it's not the optimized solution but I couldn't find another. If anyone has better solution, feel free to add it in comments.

Hope it was helpful for others.

Comments (6)