摘要:
[题目] Given a column title as appear in an Excel sheet, return its corresponding column number. For example: [题目解析] 该题目比较简单,可以理解为一个26进制的数用10进制数表示的过程。 阅读全文
摘要:
[题目] Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. [题目解析] 这 阅读全文
摘要:
[题目] Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime co 阅读全文
摘要:
[题目] Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the 阅读全文
摘要:
[题目] Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a 阅读全文
摘要:
[题目] Given a linked list, determine if it has a cycle in it. [题目解析] 判断一个单链表中是否含有环,这是一个非常常见的面试题目。思路也非常简单,可以定义两个指针,一个快,一个慢,最后慢的追上快的,指向同一个节点,说明有环。 阅读全文
摘要:
[题目] Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit 阅读全文
摘要:
[题目] Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return [题目解析] 帕斯卡三角,又称杨辉三角,给一个行数,输出杨辉三角,需要结合杨辉三角的性 阅读全文
摘要:
[题目] Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transa 阅读全文
摘要:
[题目] You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can y 阅读全文