Uber phone screen - Design Spreadsheet

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2019-06-19Added By Anonymous
Source: Link

Company: Uber

Interview Stage: Phone Screen


Original Post Content:

Design a Spreadsheet with the following methods.

It should handle formulas.

Class Spreadsheet

1) get

2) put

Have to support formulae (* , +)

B1: "=A1+A2+5"

B2: "=B1+A1"

Solved it with python to handle formulas and update the cells along with get.

I ran out of time to ensure that every put updated the formulas for each other cell that had the current cell in its formula.


def get(self,cell_location=None):

def put(self,cell_location=None, formula=None):

Comments