Class Solution
java.lang.Object
g0101_0200.s0168_excel_sheet_column_title.Solution
168 - Excel Sheet Column Title.<p>Easy</p>
<p>Given an integer <code>columnNumber</code>, return <em>its corresponding column title as it appears in an Excel sheet</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> columnNumber = 1</p>
<p><strong>Output:</strong> “A”</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> columnNumber = 28</p>
<p><strong>Output:</strong> “AB”</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> columnNumber = 701</p>
<p><strong>Output:</strong> “ZY”</p>
<p><strong>Example 4:</strong></p>
<p><strong>Input:</strong> columnNumber = 2147483647</p>
<p><strong>Output:</strong> “FXSHRXW”</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= columnNumber <= 2<sup>31</sup> - 1</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
convertToTitle
-