上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 80 下一页
摘要: 1. 无重复Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element... 阅读全文
posted @ 2015-04-08 15:25 匡子语 阅读(260) 评论(0) 推荐(0)
摘要: Jump Game (middle)Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array repr... 阅读全文
posted @ 2015-04-05 21:21 匡子语 阅读(259) 评论(0) 推荐(0)
摘要: Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].思路:开始想用线段树,后来想... 阅读全文
posted @ 2015-04-03 16:07 匡子语 阅读(242) 评论(0) 推荐(0)
摘要: 很郁闷的表示我的opencv放在 D:\\program files 里面路径有个空格,导致我不得不把整个opencv又拷贝到了一个没有空格的路径下面命名为opencvForQt网上有各种用CMake的教程,但实际上没有那么复杂,只要在pro文件里面加入包含文件和库文件即可。即加入下面的语句。我用的... 阅读全文
posted @ 2015-04-02 22:22 匡子语 阅读(504) 评论(0) 推荐(0)
摘要: 折腾了两个小时,太久没用了,找了半天的感觉。先是在视频播放的代码基础上加选择视频的按钮,开始总是显示两个框,后来发现需要用QSplitter来实现同时有多个框的情况。把中心窗口设为这个splitter就可以了:setCentralWidget(splitter); 注意,这里不能用layout.再然... 阅读全文
posted @ 2015-04-02 21:24 匡子语 阅读(1514) 评论(0) 推荐(0)
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2015-03-31 16:23 匡子语 阅读(161) 评论(0) 推荐(0)
摘要: You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?思路:我的思路,先沿对角线对称,再左右... 阅读全文
posted @ 2015-03-30 22:37 匡子语 阅读(273) 评论(0) 推荐(0)
摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2015-03-23 14:29 匡子语 阅读(218) 评论(0) 推荐(0)
摘要: 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 @ 2015-03-23 10:34 匡子语 阅读(184) 评论(0) 推荐(0)
摘要: Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to... 阅读全文
posted @ 2015-03-20 17:53 匡子语 阅读(227) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 80 下一页