[USA] Sigma Computing Second Round
159
Oct 16, 2025

First round: Here

Had second round for Sigma Computing, which is a tad bit harder than the first round, but thematically linked.

Question

You are given a pre-built spreadsheet class with these functions:

  • set_cell(row, col, value)
  • get_cell_value(row, col) --> stubbed out function
  • print_sheet() --> go through all rows and cols and print the value
  • parse_formula(formula) --> util function for your use
  • op(a, b): perform addition between two int a and b. Assume op is a magic function and it could be anything, but right now, just addition

In this case, the spreadsheet is M rows, N cols and you can instantiate like sheet = Spreadsheet(5, 3) meaning 5 rows, 3 columns. In the previous question, we assumed infinite rows for the spreadsheet but finite columns

Part 1: Implement get_cell_value(row, col)

get_cell_value(row, col) has a not defined implementation. Cell values are eiher an integer or a formula in format of =(row1, col1)@(row2, col2)@(row3, col3)....

parse_formula in the above would give operands like [(row1, col1), (row2, col2), ....]

Test case was provided but you need to implement get_cell_value(row, col) and see working run

Part 2: Performance Improvement

In the spreadsheet class, every time you call op(a, b) function, you will increment a counter. Suppose you call print_sheet() two times in a row and nothing changes in the sheet, could we reduce the number of calls to op function? You can modify anything in the Spreadsheet class

This part is the meat of the interview and requires some open ended thinking, so it's a creative problem. You need to get the counter value as low as possible

Reflections

  • Good interview process
  • Not leetcode brained
  • Mimicked a real working session where I need to modify/incorporate existing code to solve problem
  • Interviewer cares a lot about communication and recruiter emphasized that

Even though I got rejected, I enjoyed the candidate experience and very fair process. Nothing too insane like some companies that make you do 10 hr takehome for you to get ghosted

Comments (0)