摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2018-10-15 21:39 C`Moriarty 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1] Example 2: Note: 阅读全文
posted @ 2018-10-14 22:28 C`Moriarty 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2018-10-14 10:57 C`Moriarty 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2018-10-14 10:33 C`Moriarty 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2018-10-13 21:56 C`Moriarty 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2018-10-13 21:40 C`Moriarty 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1.1 概述 GC需要考虑的事:哪些内存需要回收,什么时候回收,如何回收 我们只要在程序出于运行期间的时候才会知道创建哪些对象,这部分内存和回收都是动态的,垃圾回收器所关注的就是这部分内存 1.2 对象已死吗? 回收的前提就是判断对象是否还存活 1.2.1 引用计数算法 给一个对象添加一个计数器,若 阅读全文
posted @ 2018-10-13 20:24 C`Moriarty 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2018-10-13 09:09 C`Moriarty 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has m 阅读全文
posted @ 2018-10-11 22:15 C`Moriarty 阅读(170) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2018-10-11 09:44 C`Moriarty 阅读(133) 评论(0) 推荐(0) 编辑
/* 鼠标点击求赞文字特效 */ /*鼠标跟随效果*/