摘要:
Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between iand j equals 阅读全文
摘要:
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output 阅读全文
摘要:
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
摘要:
Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we tak 阅读全文
摘要:
Design and implement a data structure for a compressed string iterator. It should support the following operations: next and hasNext. The given compre 阅读全文
摘要:
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 阅读全文
摘要:
一直对视频或者图像添加水印很感兴趣,查找资料后用OpenCV尝试了一下。 记录下来。 1.首先是打开摄像头。 找到OpenCV官方文档给出的例子。 例子中实现的是,打开摄像头,并对画面进行高斯滤波,使用canny算子检测直线边缘。 2.打开摄像头后,接下来是想在画面上添加水印,图片之类。类似于电视画 阅读全文
摘要:
用到了rgb转灰度图功能,查到两个函数,发现名字很像,功能也一样,但是参数类型不一样。 记录一下。 可以看声明,cvCvtColor是c语言风格接口。 而cvtColor是c++语言风格接口。 //InputArray:接口类可以是Mat、Mat_<T>、Mat_<T, m, n>、vector<T 阅读全文
摘要:
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
摘要:
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文