01 2017 档案
摘要:A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because concatenating the number of contiguous
阅读全文
摘要:在Mac上使用Latex的话主流是安装MacTex,对于IDE的选择有很多,像什么自带的TexShop,或者是TexStudio,Latexian,Texpad,Texmaker等,甚至可以直接使用一些通用的编程IDE,比如MacVim,Emacs,Sublime Text等等。 博主喜欢用TexS
阅读全文
摘要:Now you are given a string S, which represents a software license key which we would like to format. The string S is composed of alphanumerical charac
阅读全文
摘要:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte
阅读全文
摘要:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Given n points on a 2D plane, find the maximum num
阅读全文
摘要:在之前的博客QInputDialog 使用方法中展示了利用QInputDialog可以快速通过一行代码来生成一个输入框,来获取用户的输入值,那么如果我们希望获取多个输入值,怎么办呢?那么此时用QInputDialog就没法实现了,我们必须基于QDialog类重新写一个类,可是只是一个简单的多值输入框
阅读全文
摘要:Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t
阅读全文
摘要:在OpenCV中,有强大的处理相机事件的api,但是貌似没有直接获取相机的最大分辨率的函数,通过属性CV_CAP_PROP_FRAME_HEIGHT和CV_CAP_PROP_FRAME_WIDTH直接获取的貌似只是默认的分辨率640x480,不过我们可以通过手动设置来修改分辨率,使其可以达到自身所支
阅读全文
摘要:Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as
阅读全文
摘要:Write a program to find the node at which the intersection of two singly linked lists begins. Notice If the two linked lists have no intersection at a
阅读全文
摘要:Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the
阅读全文
摘要:PLY格式是比较流行的保存点云Point Cloud的格式,可以用MeshLab等软件打开,而VTK是医学图像处理中比较常用的格式,可以使用VTK库和ITK库进行更加复杂的运算处理。我们可以使用ParaView软件对VTK格式文件进行预览和简单处理,ParaView也可以打开PLY格式,但是就没有t
阅读全文
摘要: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 comple
阅读全文