Microsoft design round- Noida location
Anonymous User
482

I was recently asked the Design question of an excel autofill feature such as to consider scalability and availability of the design in mind.
e.g. in continuous 2 (or 3 cells), write 1&2(or 1,2 & 3) and select all of them and drag further down all next numbers will autofill in adjacent cells. Same with January, February, and drag then March and so on will autofill.
Some points to note here:

  1. what if the series is in any system(binary, octal, Hindi number like ३, ४ etc or more complicated one like ek, do, teen, (for 1,2, 3) etc).
  2. How to detect in the first place which group the input belongs to. It can be english characters a-z A-Z, or french, german etc characters or String or numbers in any representation system.
  3. If there is not continuous pattern then the selected cells repeat in the next continuous cells(for decimal numbers this point we had to assume which is slight different behavior for numbers in excel where inputting random numbers still detected some pattern somehow) e.g. A(cell1) K(cell2) L(cell3) so next autofill characters will be A then K then L and so on since there is not pattern(diff between A and K is different and K and L is different).

Also have to figure out how can the system be more responsive.(cache or indexing). Hope someone can help in this particular design.
Keeping my approach brief: Take an abstract class say AbstractSet<T> and then divide the extension into more categories like NumberSet<T>, CharacterSet<T>, StringSet<T> then further division like NumbersSet<Decimal> NumbersSet<Binary> etc. user input will be known set range but couldn't exactly explain it properly.

Anyhow I assumed a patternDiff sort of thing which essentially is 1 between any consecuting set elements (Jan, Feb or 1,2) but everything got struct at point 2 mentioned above. How to find which category user input belongs to?
Maybe Unicode based or some other charset where all chars of the world resides and a mapping of them with their corresponding Trie root node(for consecutive set element but not sure) and assuming every input as a string. Then we need to add a preprocessor/parser for this string and map characters to find out the type of input user has given.

Comments (1)