摘要: 题目: 证明: 很容易将最小顶点覆盖归约到HITTING SET。假设要求图G的最小顶点覆盖,可以建立一个 HITTING SET 实例,其中 S1 , S2 , S3,...,Sn 即是图G的各条边,比如{v1,v2},{v3,v4},... 。通过二分式的询问,可以找到一个与 Si都相交的最小集 阅读全文
posted @ 2017-07-05 23:59 MT.Queen 阅读(246) 评论(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 co 阅读全文
posted @ 2017-06-27 21:37 MT.Queen 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目: 107. Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to 阅读全文
posted @ 2017-06-16 11:52 MT.Queen 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目:108. Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题 阅读全文
posted @ 2017-06-13 17:21 MT.Queen 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 111. Minimum Depth of Binary Tree 问题描述: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path 阅读全文
posted @ 2017-06-11 18:17 MT.Queen 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of strings, group anagrams together. (给定一个字符串数组,将他们根据anagram归类) 样例: given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [["a 阅读全文
posted @ 2017-06-11 13:25 MT.Queen 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 记录一下整个相机的标定矫正过程,希望能够帮助到刚学习标定的童鞋们~ 首先下载matlab calibration toolbox,百度搜索第一条就是了(http://www.vision.caltech.edu/bouguetj/calib_doc/)。下载到本地后,需要在MATLAB中更改主路径: 阅读全文
posted @ 2017-06-09 16:46 MT.Queen 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear 阅读全文
posted @ 2017-06-05 17:56 MT.Queen 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest 阅读全文
posted @ 2017-05-31 14:37 MT.Queen 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 题目: You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both t 阅读全文
posted @ 2017-05-19 11:19 MT.Queen 阅读(167) 评论(0) 推荐(0) 编辑