上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要: 一、前言 本篇将介绍一些gtest的基本使用,包括下载,安装,编译,建立我们第一个测试Demo工程,以及编写一个最简单的测试案例。 二、下载 如果不记得网址, 直接在google里搜gtest,第一个就是。目前gtest的最新版本为1.3.0,从下列地址可以下载到该最新版本: http://goog 阅读全文
posted @ 2016-07-05 09:22 0giant 阅读(314) 评论(0) 推荐(0)
摘要: 把只包含因子2、3和5的数称作丑数(Ugly Number)。例如6、8都是丑数,但14不是,因为它包含因子7。 习惯上我们把1当做是第一个丑数。求按从小到大的顺序的第N个丑数。 leetcode上也有这道题。不过是判断一个数是否为丑数。貌似是我第二道解出来的leetcode,印象还蛮深的。用了递归 阅读全文
posted @ 2016-07-05 09:20 0giant 阅读(288) 评论(0) 推荐(0)
摘要: Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element 阅读全文
posted @ 2016-07-03 11:09 0giant 阅读(357) 评论(0) 推荐(0)
摘要: 122. Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to 阅读全文
posted @ 2016-07-01 07:54 0giant 阅读(200) 评论(0) 推荐(0)
摘要: 137. Single Number II 137. Single Number II Total Accepted: 87688 Total Submissions: 229128 Difficulty: Medium Given an array of integers, every eleme 阅读全文
posted @ 2016-06-28 15:08 0giant 阅读(349) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2016-06-28 10:33 0giant 阅读(314) 评论(0) 推荐(0)
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. Subscribe to 阅读全文
posted @ 2016-06-25 21:39 0giant 阅读(169) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/yjiyjige/p/3263858.html KMP算法应该是每一本《数据结构》书都会讲的,算是知名度最高的算法之一了,但很可惜,我大二那年压根就没看懂过~~~ 之后也在很多地方也都经常看到讲解KMP算法的文章,看久了好像也知道是怎么一回事,但总感觉有 阅读全文
posted @ 2016-06-21 15:49 0giant 阅读(5165) 评论(0) 推荐(1)
摘要: Shortest Palindrome Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest 阅读全文
posted @ 2016-06-21 15:35 0giant 阅读(168) 评论(0) 推荐(0)
摘要: bash应该是目前Linux上最流行的shell脚本解释程序了(还有个shell叫dash,我太讨厌这个东东了。),只要你在linux上工作,并且希望自己能够工作得更愉悦,那么你应该熟悉最基本的bash编程,因为它将给你的工作带来足够的幸福感。本文将总结一些我自己平时使用的bash基本编程知识,和大 阅读全文
posted @ 2016-06-19 16:30 0giant 阅读(413) 评论(0) 推荐(0)
摘要: PS:$引用变量的时候不要加空格。用了case,while的结构。 main文件 usb程序 compression程序 changemod程序——改变文件的读写执行权限 changedate程序——显示时间、修改系统时间 findfile程序——查找文件(给出完整名称,部分名称,但是要给出绝对路径 阅读全文
posted @ 2016-06-19 16:28 0giant 阅读(605) 评论(0) 推荐(0)
摘要: Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be for 阅读全文
posted @ 2016-06-17 12:24 0giant 阅读(206) 评论(0) 推荐(0)
摘要: 首先说下动态规划,动态规划这东西就和递归一样,只能找局部关系,若想全部列出来,是很难的,比如汉诺塔。你可以说先把除最后一层的其他所有层都移动到2,再把最后一层移动到3,最后再把其余的从2移动到3,这是一个直观的关系,但是想列举出来是很难的,也许当层数n=3时还可以模拟下,再大一些就不可能了,所以,诸 阅读全文
posted @ 2016-06-15 13:15 0giant 阅读(5357) 评论(1) 推荐(1)
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat 阅读全文
posted @ 2016-06-15 12:17 0giant 阅读(273) 评论(0) 推荐(0)
摘要: 1.概论 先来阐述一下DLL(Dynamic Linkable Library)的概念,你可以简单的把DLL看成一种仓库,它提供给你一些可以直接拿来用的变量、函数或类。在仓库的发展史上经历了“无库-静态链接库-动态链接库”的时代。 静态链接库与动态链接库都是共享代码的方式,如果采用静态链接库,则无论 阅读全文
posted @ 2016-06-13 15:59 0giant 阅读(1084) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页