mirror of
https://github.com/arkorty/LeetCode.git
synced 2026-03-18 00:57:17 +00:00
Refactor almost everything
This commit is contained in:
@@ -2,7 +2,7 @@ class Solution {
|
||||
public int titleToNumber(String ttl) {
|
||||
int num = 0;
|
||||
for (int i = 0; i < ttl.length(); i++)
|
||||
num += Math.pow(26, i) * (int) (ttl.charAt(ttl.length() - i - 1) - 64);
|
||||
num += Math.pow(26, i) * (int)(ttl.charAt(ttl.length() - i - 1) - 64);
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user