To the Top
File:  root - text - article - 2020 - 02 - spreadsheet-columns.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 3260 Views, 22194 Search Bots | 80 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Apple:

In many spreadsheet applications, the columns are marked with letters. From the 1st to the 26th column the letters are A to Z. Then starting from the 27th column it uses AA, AB, ..., ZZ, AAA, etc.

Given a number n, find the n-th column name.


def column_name(n):
# Fill this in.

print column_name(26)
print column_name(27)
print column_name(28)
# Z
# AA
# AB
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 3260 Views, 22194 Search Bots | 80 Words Subscribe to Feed Burner

Related Articles

  1. [Daily Problem] Add two numbers as a linked list
  2. Algorithm Interview Question: Find the Single Element in an Array of Duplicates
  3. Algorithm Interview Question: Nth Fibonacci Number
  4. Daily Interview Problem: Jump to the End
  5. PHP Unit Tests on VPS Server
  6. Skip the readings, focus on problems. And use all the hints!
  7. [Daily Problem] Validate Balanced Parentheses
  8. Detect Linked List Cycle
  9. Algorithm Interview: Shifted String
  10. CVE-2015-8874 - cPanel EasyApache Vulnerabilities

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />