[USA] Sigma Computing Second Round
Summary
I recently had my second-round interview with Sigma Computing in the USA. It was a challenging yet fair process, emphasizing communication and problem-solving over standard LeetCode patterns. Although I was rejected, I found the experience valuable and appreciated its practical, working-session style.
Full Experience
I had my second round for Sigma Computing, which was a tad bit harder than the first round, but thematically linked. The interview process was good, definitely not "LeetCode brained." It mimicked a real working session where I needed to modify and incorporate existing code to solve a problem. The interviewer really cared about communication, and the recruiter had emphasized this point. Even though I got rejected, I enjoyed the candidate experience and found it to be a very fair process, without the insanity of some companies that demand 10-hour take-homes only to ghost you.
Interview Questions (2)
You are given a pre-built spreadsheet class with functions like set_cell(row, col, value), get_cell_value(row, col) (stubbed out), print_sheet(), parse_formula(formula), and op(a, b) (currently addition, but can be anything). The spreadsheet is M rows, N columns, instantiated as sheet = Spreadsheet(5, 3). Cell values are either integers or formulas in the format =(row1, col1)@(row2, col2)@(row3, col3)..... The parse_formula utility provides operands as [(row1, col1), (row2, col2), ....]. Your task is to implement get_cell_value(row, col) to correctly retrieve the value of a cell, resolving formulas by summing values from referenced cells. Test cases were provided for a working run.
Building on the spreadsheet class, imagine that every call to the op(a, b) function increments a counter. Your challenge is to improve performance such that if print_sheet() is called multiple times in a row without any changes to the sheet, the number of calls to the op function is significantly reduced. You are allowed to modify anything within the Spreadsheet class. This part of the interview is open-ended and requires creative problem-solving to minimize the counter value.