上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 76 下一页
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 → a2 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(83) 评论(0) 推荐(0)
摘要: Write a function that takes a string as input and returns the string reversed. Example 1: Input: "hello" Output: "olleh" Example 2: Input: "A man, a p 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(75) 评论(0) 推荐(0)
摘要: You have a total of n coins that you want to form in a staircase shape, where every k th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(95) 评论(0) 推荐(0)
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(122) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root to leaf paths. Note: A leaf is a node with no children. Example: Input: Output: ["1 2 5", "1 3"] Explanation: All 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(361) 评论(0) 推荐(0)
摘要: The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another n 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(89) 评论(0) 推荐(0)
摘要: 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 you cl 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(99) 评论(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 sum. N 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(95) 评论(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 nearest l 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(71) 评论(0) 推荐(0)
摘要: Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's value equals the given value. Retu 阅读全文
posted @ 2018-11-30 15:16 bernieloveslife 阅读(100) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 76 下一页