File: root - text - article - 2019 - 11 - look-and-say-sequence.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 603 Views, 18696 Search Bots | 77 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 603 Views, 18696 Search Bots | 77 Words
| Browse | Archive
Hi, here's your problem today. This problem was recently asked by Google:
A look-and-say sequence is defined as the integer sequence beginning with a single digit in which the next term is obtained by describing the previous term. An example is easier to understand:
Each consecutive value describes the prior value.
Your task is, return the nth term of this sequence.
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 603 Views, 18696 Search Bots | 77 Words A look-and-say sequence is defined as the integer sequence beginning with a single digit in which the next term is obtained by describing the previous term. An example is easier to understand:
Each consecutive value describes the prior value.
1 #
11 # one 1's
21 # two 1's
1211 # one 2, and one 1.
111221 # #one 1, one 2, and two 1's.
Your task is, return the nth term of this sequence.
Related Articles
- Maximum In A Stack
- Spreadsheet Columns
- Daily Interview Problem: Distribute Bonuses
- Design Tic-Tac-Toe
- Absolute Path
- Spectrum Master
- Daily Interview Problem: Reconstrunct Binary Tree from Preorder and Inorder Traversals
- CVE-2015-8874 - cPanel EasyApache Vulnerabilities
- A trick for getting good at coding interviews FASTER
- Sort a Partially Sorted List
©2006~2024 SteakOverCooked - 0.00732 Seconds(s) - 2683.712 KB/s - 813 Online Memory: 492.66 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !