I was recently asked in a job interview to resolve a programming puzzle that I thought it would be interesting to share. It\'s about translating Excel column letters to actu
Easy Java solution -->
public class ColumnName {
public static int colIndex(String col)
{ int index=0;
int mul=0;
for(int i=col.length()-1;i>=0;i--)
{
index += (col.charAt(i)-64) * Math.pow(26, mul);
mul++;
}
return index;
}
public static void main(String[] args) {
System.out.println(colIndex("AAA"));
}