Implementing a Spreadsheet with Custom Column Names at sigmacomputing
Question Details
Design a spreadsheet with: Unlimited rows, limited columns Columns have string names (like "A", "B", "Sales") All cells store integers (default: 0) Support these 3 operations: Set(row, column, value)
Full Details
Design a spreadsheet with: Unlimited rows, limited columns Columns have string names (like "A", "B", "Sales") All cells store integers (default: 0) Support these 3 operations: Set(row, column, value) - Put a number in a cell Get(row, column) - Get the number from a cell (return 0 if empty) printTopN(n) - Show the first n rows with column names in the first row followup: -> The cell can hold a formula like "row1 and col1 plus row2 and col2". similar to: https://leetcode.com/problems/design-excel-sum-formula/description/ but the column name is any string instead of just A, B, C