上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: 题目描述: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The fu 阅读全文
posted @ 2018-02-15 01:53 宵夜在哪 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin 阅读全文
posted @ 2018-02-15 01:30 宵夜在哪 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime 阅读全文
posted @ 2018-02-14 01:08 宵夜在哪 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 阅读全文
posted @ 2018-02-12 15:15 宵夜在哪 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 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 trans 阅读全文
posted @ 2018-02-12 14:08 宵夜在哪 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorit 阅读全文
posted @ 2018-02-11 22:22 宵夜在哪 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return 本题要我们输入一个整数(行数),返回二维数组形式的杨辉三角(帕斯卡三角)。 解题思 阅读全文
posted @ 2018-02-11 21:48 宵夜在哪 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given 阅读全文
posted @ 2018-02-10 12:51 宵夜在哪 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nea 阅读全文
posted @ 2018-02-10 11:50 宵夜在哪 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: Example 1: Given the fol 阅读全文
posted @ 2018-02-10 00:42 宵夜在哪 阅读(90) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页