程序媛詹妮弗
终身学习
摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2018-06-02 08:55 程序媛詹妮弗 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 阅读全文
posted @ 2018-05-31 08:37 程序媛詹妮弗 阅读(235) 评论(0) 推荐(0) 编辑
摘要: A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i 阅读全文
posted @ 2018-05-31 07:10 程序媛詹妮弗 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo 阅读全文
posted @ 2018-05-30 07:18 程序媛詹妮弗 阅读(387) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文
posted @ 2018-05-30 06:00 程序媛詹妮弗 阅读(295) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ... n. 题意: 给定n个节点,列举可形成的不同的BST集合 思路: 跟 [leetcode] 阅读全文
posted @ 2018-05-30 05:07 程序媛詹妮弗 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Input: 3 Output: 5 Explanation: Given n = 3, there are a 阅读全文
posted @ 2018-05-30 04:50 程序媛詹妮弗 阅读(335) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2018-05-26 03:32 程序媛詹妮弗 阅读(187) 评论(0) 推荐(0) 编辑
摘要: You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists. We define 阅读全文
posted @ 2018-05-25 04:28 程序媛詹妮弗 阅读(839) 评论(0) 推荐(1) 编辑
摘要: 我们知道Queue是遵循先进先出(First-In-First-Out)模式的,但有些时候需要在Queue中基于优先级处理对象。举个例子,比方说我们有一个每日交易时段生成股票报告的应用程序,需要处理大量数据并且花费很多处理时间。客户向这个应用程序发送请求时,实际上就进入了队列。我们需要首先处理优先客 阅读全文
posted @ 2018-05-25 01:21 程序媛詹妮弗 阅读(537) 评论(0) 推荐(0) 编辑