上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 76 下一页
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2018-10-10 10:51 bernieloveslife 阅读(92) 评论(0) 推荐(0) 编辑
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2018-10-10 10:51 bernieloveslife 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root to leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Exampl 阅读全文
posted @ 2018-10-10 10:51 bernieloveslife 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer 阅读全文
posted @ 2018-10-09 10:31 bernieloveslife 阅读(150) 评论(0) 推荐(0) 编辑
摘要: There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary i 阅读全文
posted @ 2018-10-09 10:31 bernieloveslife 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a n ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le 阅读全文
posted @ 2018-10-09 10:31 bernieloveslife 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Given an array, rotate the array to the right by k steps, where k is non negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] 阅读全文
posted @ 2018-10-09 10:31 bernieloveslife 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 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 function 阅读全文
posted @ 2018-10-09 10:31 bernieloveslife 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given n pairs of parentheses, write a function to generate all combinations of well formed parentheses. For example, given n = 3, a solution set is: [ 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(165) 评论(0) 推荐(0) 编辑
摘要: A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: 2: turn left 90 deg 阅读全文
posted @ 2018-10-08 13:00 bernieloveslife 阅读(307) 评论(0) 推荐(0) 编辑
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 76 下一页