摘要: 本文原创,未经同意,谢绝转载!(转载请告知本人并且经过本人同意--By Pacific-hong) 本人小硕一枚,因为专业方向图像相关,所以用到opencv,然后网上MAC下Xcode配置opencv的教程比较少,要不然就是过时了。所以在一番倒腾之后,成功配置了OpenCV。写下本文供他人参考,少走 阅读全文
posted @ 2017-03-30 10:48 Pacific-hong 阅读(6609) 评论(9) 推荐(4) 编辑
摘要: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
posted @ 2017-02-27 10:14 Pacific-hong 阅读(915) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2017-02-27 00:31 Pacific-hong 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you 阅读全文
posted @ 2017-02-24 14:57 Pacific-hong 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2017-02-23 09:53 Pacific-hong 阅读(294) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文
posted @ 2017-02-22 13:47 Pacific-hong 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 阅读全文
posted @ 2017-02-21 11:48 Pacific-hong 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2017-02-20 21:23 Pacific-hong 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 思路:才用快慢指针,找到中间节点,然后递归处理。 accepted code: 阅读全文
posted @ 2017-02-20 13:56 Pacific-hong 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2017-02-19 22:48 Pacific-hong 阅读(154) 评论(0) 推荐(0) 编辑