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 | 3354 Views, 25506 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 | 3354 Views, 25506 Search Bots | 80 Words Subscribe to Feed Burner

Related Articles

  1. Design Tic-Tac-Toe
  2. Daily Interview Problem: Merge List Of Number Into Ranges
  3. Daily Interview Question: Longest Sequence with Two Unique Numbers
  4. Daily Interview Problem: Distribute Bonuses
  5. [Daily Problem] Witness of The Tall People
  6. Sorting a list with 3 unique numbers
  7. Floor and Ceiling of a Binary Search Tree
  8. Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
  9. Daily Interview Problem: Min Stack
  10. Daily Interview Problem: Largest Product of 3 Elements I

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />