

Updated by Amazon candidates

Software Engineer Interview Experience
Interview process
The OA is quite long and has multiple parts. Other than the technical coding questions, there are behavioral questions based on the LP and work style simulation (choosing between email replies)
- Online assessment
Interview tips
Leetcode on standard data structures and algorithms, especially tagged for Amazon. Go through the LP tensions and answer the behavioral questions consistently.
Company culture
Big company, and communication during the process was slow. For each country, there is a separate recruiting department.
Questions asked
Question types asked
Specific questions asked
Amazon's development team is working on a feature for a new product, a smart array processor. In this smart processor, quite simply, given an array of numbers and instructions on which parts of the array to pick and combine into a new array, for each number in the original array, if it's included in the new array, its efficiency is O; otherwise, the efficiency is the count of smaller numbers in the new array. The goal is to add up the efficiencies for all numbers in the original array. A user has provided an integer array called arr of sizen and a 2-dimensional array called pairs of size m x 2. Eachpair in the pairs array represents the starting and ending indices of a subarray within arr. For each subarray of arr represented by the array pairs, the goal is to merge and concatenate them into a new array called efficient. The efficiency of an element at index i in arris defined as follows: if the index i has not contributed to the formation of the array efficient, the efficiency is the count of integers in efficient that have a value strictly smaller than arlil. If the index i has contributed to the formation of the array efficient, its efficiency is o. Find the sum of the efficiency of all the elements in the array arr. Example n = 6 arr = [1, 2, 3, 2, 4, 5] m = 4 pairs = [[0, 1], [3, 4], [0, 0], [3, 4]] On concatenating all the subarrays represented by pairs, we get efficient= [1, 2, 2, 4, 1, 2, 4] The indices 2 and 5, don't contribute to the formation of the array efficient. •For index 0, arr[0] = 1, the index has contributed to the formation of efficient, hence its efficiency is 0. • For index 1, arr[1] = 2, the index has contributed to the formation of efficient, hence its efficiency is 0. • For index 2, arr[2] = 3, the elements [1, 2, 2, 1, 2] are smaller than 3, having count = 5, hence its efficiency is 5. •For index 3, arr[3] = 2, the index has contributed to the formation of efficient, hence its efficiency is 0. • For index 4, arr[4] = 4, the index has contributed to the formation of efficient, hence its efficiency is 0. • For index 5, arr[5] = 5, the elements [1, 2, 2, 4, 1, 2, 4] are smaller than 5, having count = 7, hence its efficiency is 7. The sum of the efficiencies of elements in arr = 0+0+5+0+0 + 7 = 12, hence the answer is 12.
Get full access with a membership, or share your experience to try it free.
