IMC Interview Question
The 1300 square foot houses are both outliers, so they are discarded. The new arrays are area' = [1200, 1200, 1200, 2000] and price' = [12000, 14000, 13000, 30000]. Interpolate the price between the two house sizes remaining. The interpolated price is 13000 + (1500 - 1200) * (30000 - 13000)/(2000-1200) = 19375. Function Description Complete the function findValuation in the editor below. The function must return the expected price rounded to the nearest integer. findValuation has the following parameter(s): int reqArea: the area of the candidate house in square feet int area[n]: areai] is the area in square feet of the ith house sold from the historic data set int price[n]: price[i] is the price of the ith house sold from the historic data set Constraints • 500 < regArea < 105 • 500 < areali] < 105 for all /such that 0 < i
Unlock the Full Solution
Enter your email to get instant access to the complete solution, explanation, and similar practice problems.