Opendoor| SDE-2 | Bangalore

Anonymous User
529
Aug 08, 2023
Aug 08, 2023

Current Position: SDE1
Exp: 2 year (full time) + 1 year(intern)
Date: August,2023

Interview Process:

  • DSA round
  • LLD round
  • Design Round
  • HM Round
  • HR Round

Round -1
Question 1:

Build a baby names search engine.

key: source list name (e.g. "2015-us-official-boys", "2015-baby-center-girls")
value: a list of names in the order of popularity (e.g. [ "Sophia", "Emma", "Olivia", ... ])
baby-names-data.json

{
"2016-baby-center-girls": [ "Sophia", "Emma", "Olivia", ... ],
"2016-baby-center-boys": [ "Jackson", "Aiden", "Lucas", ...],
"2015-baby-center-girls": [ "Sophia", "Emma", "Olivia", ... ],
...
}

Write a function that given a name, returns an ascending rank sorted list of names of all lists where the given name appears.

For example, given "sophia", function returns:

[
{list: "2016-baby-center-girls", rank: 1},
{list: "2015-baby-center-girls", rank: 1},
{list: "2015-us-official-girls", rank: 3}
]

Round -2
Today we’re going to build a basic spreadsheet application like Google sheets or Excel but much simpler. Our spreadsheet, let’s call it OpenSheet, will only support cells which hold either integers or formulas that sum two cells.

You are tasked with writing a program that handles this functionality for OpenSheet. You can make any decisions you want regarding how this program is organized, but there must be some sort of setter/getter methods that can be called by the application for any given cell. All inputs will be strings.

For setting you can expect two inputs: the cell location and the cell value.

Example of how your setter could look
set_cell("C1", "45")
set_cell("B1", "10")
set_cell("A1", "=C1+B1")
void, (string, string)

For getting you will be provided one input that is the cell location.

Example of how your getter could look
set_cell("C1", "45")
set_cell("B1", "10")
set_cell("A1", "=C1+B1")
get_cell("A1") # should return 55 in this case
int, (string)

Please take care of below test cases:

int main() {
set_cell("C1", "100");
set_cell("B1", "10");
set_cell("A1", "=C1+B1");
set_cell("D1", "40");
set_cell("F1", "=A1+D1");
cout<<get_cell("A1")<<endl; // 110
cout<<get_cell("F1")<<endl; // 150


set_cell("B1", "25");
//cout<<get_cell("A1")<<endl; // 125
cout<<get_cell("F1")<<endl; // 165 (100+25)+40
}

Verdict: Rejected

Do upvote if its helpful

Comments (3)