Amazon | FEE 1 | Bangalore | Oct 2020 | [offer]
Anonymous User
3799

Experience: 3 years

Online Assesment:

  1. https://leetcode.com/discuss/interview-question/373202
  2. https://leetcode.com/discuss/interview-question/356960

Virtual Onsite:

Round 1: (Hiring Manager)

  1. 2 Leadership Principle questions
    -> Describe a technically challenging project you delivered
    -> Tell me about a time where your customer wanted onething, but you went beyond and gave them something extra than what they needed.
  2. HTML questions:
    -> Create a Navigation bar with a dropdown with this structure:
    Horizontal bar: Home | New Releases | Browse | Sales
    Sub-items under Browse dropdown menu (on hover):
    - By Series
    - By Publisher
    - By Top Rated
    - By Genre
    -> Create a rating widget with 5 stars
    * The stars should initially appear grey and in a horizontal row
    * When a user hovers over a star, that star and any previous stars should light up
    * When a user clicks on a star, their rating should be saved,
    and, when hovering away, the rated stars should remain lit.

Round 2: Technical (Front End concepts)

  1. Take a look at the code snippet and identify some improvements: was given a HTML snippet

  2. What color might "Hello!" be ? in bellow code block & was asked to explain why and about CSS specificity

      <div id="a-container-outer" class="a-color-seasonal">
      	<div id="a-container-inner">
      		Hello!
      	</div>
      </div> 
    
      ```css
      #a-container-outer.a-color-seasonal {
      	color: blue;
      }
      #a-container-inner {
      	color: red;
      }
      div div {
      	color: orange;
      }
      ```

      ```css
      .intro {background-color: yellow;}
      h1 {background-color: red;}
      ```
      <h1 class="intro">Hello!</h1>
  3. Write HTML code to implement Accordian : https://www.w3schools.com/howto/howto_js_accordion.asp

  4. What will be the output of given javascript snippets:

    	```
    	var x = "Hello";
    	function funExample() {
    		var x = "Is it me you're looking for?";
    		logger();
    	}
    	function logger() {
    		console.log(x);
    	}
    	funExample();
    -------------------------------------------------
    	var x = "Hello";
    	function funExample() {
    		var x = "Is it me you're looking for?";
    		function logger() {
    			console.log(x);
    		}
    		return logger;
    	}
    	var logger = funExample();
    	logger();
    	```
  5. Implement a linkedList with addLast() and removeLast() methods.

  6. Create a function that takes a string and returns the string with duplicates removed:
    const str = 'This is is a test test string';
    removeDuplicates(str); // 'This is a test string'
    I implemented a solution using a hashMap, later was asked if I can use a different data structure, I used set()

  7. How would you center a div in a page?

Round 3: (Technical Front end concepts)

  1. what will be output of code snippet :

    ```
    function greet(person) {
      if (person == { name: 'amy' }) {
    	return 'hey amy'
      } else {
    	return 'hey arnold'
      }
    }
    greet({ name: 'amy' });
    
    ```
  2. Implement cloneDeep function to deep copy object a: with case that the object properties might have many levels of nesting and can be of type array also

    ```
    let a = {
    	name: 'Jon',
    	fname: {
    		title: 'Got'
    	}
    }
    
    ```
  3. correct the code snippet below and make it output 'doggo' : I suggested I will use call() or apply()

    ```
    let dog = {
      name: 'doggo',
      sayName() {
    	console.log(this.name)
      }
    }
    let consoleName = dog.sayName
    ```
  4. Implement the below code snippet:

     ```
     const developer = new DeveloperBuilder('John')
       .addSkill('ES6')
       .addSkill('TypeScript')
       .setFramework('React');
      ```
  5. Implement

    ```
    const endorsements = [
      { skill: 'javascript', user: 'Chad' },
      { skill: 'javascript', user: 'Bill' },
      { skill: 'javascript', user: 'Sue' },
      { skill: 'html', user: 'Sue HTML' },
      { skill: 'css', user: 'Sue CSS' },
      { skill: 'css', user: 'Bill CSS' }
    ];
    
    // Expected output
    // [
    //   { skill: 'javascript', user: [ 'Chad', 'Bill', 'Sue' ], count: 3 },
    //   { skill: 'css', user: [ 'Sue', 'Bill' ], count: 2 },
    //   { skill: 'html', user: [ 'Sue' ], count: 1 }
    // ];	
    ```
  6. How do you align a div to center of page?

Round 4: (Technical Problem solving + 1 behavioural)

  1. Implement a function which finds the index of a number if it exists or adds it at the right place of the given sorted array:
    * arr = [1,2,3,4] searchElement = 3
    output: 2
    * searchElement = 5 output: 4
    * arr = [1,3,4,5] searchElement = 2 output: 1
  2. Implement a function to merge two sorted arrays
    arr1 = [1,2,3,4]
    arr2 = [2,5,6,7]
    output: [1,2,2,3,4,5,6,7]

Front End Engineer interviews are a lot different from SDE role interviews and comprise of 70-80% of front end relevant concepts (HTML, CSS & Javascript) and only about 20-30% of Data Structures & Algorithms.

Some of the resources, I found helpful:

Comments (6)