Class Solution
java.lang.Object
g0101_0200.s0171_excel_sheet_column_number.Solution
171 - Excel Sheet Column Number.<p>Easy</p>
<p>Given a string <code>columnTitle</code> that represents the column title as appear in an Excel sheet, return <em>its corresponding column number</em>.</p>
<p>For example:</p>
<pre><code> A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
...
</code></pre>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> columnTitle = “A”</p>
<p><strong>Output:</strong> 1</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> columnTitle = “AB”</p>
<p><strong>Output:</strong> 28</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> columnTitle = “ZY”</p>
<p><strong>Output:</strong> 701</p>
<p><strong>Example 4:</strong></p>
<p><strong>Input:</strong> columnTitle = “FXSHRXW”</p>
<p><strong>Output:</strong> 2147483647</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= columnTitle.length <= 7</code></li>
<li><code>columnTitle</code> consists only of uppercase English letters.</li>
<li><code>columnTitle</code> is in the range <code>["A", "FXSHRXW"]</code>.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
titleToNumber
-