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:
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.