I had phone screen round with Google for Software Engineer Role (Google India).
They first asked me about my projects that I did in my current organisation.
The technical coding question was as below :
Microsoft Excel names its columns using uppercase letters: A, B, C, ... Z, AA, AB, AC, ..., AZ, BA, BB, ...., CZ, DA, …, ZZ, AAA, AAB, .
I could write the code for both of them and then he asked me that what if the character set was different then how would you retrieve the column number?
[1, j, W]
1, j, W, 11, 1j, 1W, j1, jj, jW,....
I suggested you could use base as "length of char array" and for retrieving the character you can use the index for the corresponding modulo of the number.Asked me to write the code for the same.
Asked what is the runtime complexity for the code.
CLEARED THE PHONE INTERVIEW!!