- 博客(135)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 [LeetCode] 561.Array Partition I 备忘
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large a
2017-09-13 23:11:11 302
原创 [LeetCode] 476.Number Complement 备忘
476. Number ComplementGiven a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guarant
2017-09-13 00:11:27 338
原创 [LeetCode] 461.Hamming Distance 备忘
461. Hamming DistanceThe Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming
2017-07-12 21:58:49 335
原创 leetcode刷题,总结,记录,备忘 387
leetcode387 First Unique Character in a StringGiven a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"ret
2016-09-06 19:53:56 365
转载 vim插件安装
转载一个vim插件安装攻略原文出处:http://littlewhite.us/archives/212C/C++是使用比例最高的程序语言,而vim是专为程序员开发的编辑器,当这两者结合起来,会给我们带来怎样的效果呢。对于windows上做C++开发的用户来说,vs为他们做了大量的工作,语法高亮、自动缩进、智能提示等等,当你happy的使用vs时,请记住
2016-08-31 22:56:11 9281 1
转载 centos安装codeblocks
转载一个centos下安装codeblocks的教程原文出处http://www.cnblogs.com/zhanjindong/archive/2013/05/05/3061108.html今天下午闲着没事尝试在自己的PC中的CentOS上装一个Code::Blocks,因为是Linux菜鸟折腾了一下午才基本算搞定但依然有疑惑:在网上各种谷哥度娘最后才发现还是官方
2016-08-30 22:57:26 1886
原创 leetcode刷题,总结,记录,备忘 383
leetcode383 Ransom Note Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the
2016-08-24 20:25:21 2296
原创 leetcode刷题,总结,记录,备忘 257
leetcode257 Binary Tree PathsGiven a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths
2016-08-15 20:29:31 327
原创 leetcode刷题,总结,记录,备忘 290
leetcode290 Word PatternGiven a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern an
2016-08-12 23:26:41 275
原创 leetcode刷题,总结,记录,备忘 19
leetcode19Remove Nth Node From End of ListGiven a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2.
2016-08-08 23:22:15 705
原创 leetcode刷题,总结,记录,备忘 350
leetcode350Intersection of Two Arrays IIGiven two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:
2016-07-28 22:48:23 301
原创 leetcode刷题,总结,记录,备忘 367
leetcode367Valid Perfect SquareGiven a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function such as
2016-07-26 23:30:41 746
原创 leetcode刷题,总结,记录,备忘 357
leetcode357Count Numbers with Unique DigitsGiven a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n.Example:Given n = 2, return 91. (The answer should be the
2016-07-20 23:16:33 316
原创 leetcode刷题,总结,记录,备忘 349
leetcode349 Intersection of Two ArraysGiven two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each
2016-07-06 22:25:31 286
原创 leetcode刷题,总结,记录,备忘 371
leetcode371Sum of Two IntegersCalculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.使用位操作解决该问题。举个例子,比如1和3
2016-06-30 22:55:10 352
原创 关于libcurl库使用的一些问题
这段时间使用到libcurl库这个工具,我在网上下了一个libcurl-7.19.3-win32-ssl-msvc,下载地址http://download.csdn.net/detail/guicaisa/9557922当我们下载完实际配置好,把库里自带的动态库都放到正确的位置之后,发现程序运行失败,我这边缺截图,下次再放上来。其根本原因是openldap.dll这个动态库缺少依赖的动态库
2016-06-23 22:31:16 1054
原创 leetcode刷题,总结,记录,备忘 205
leetcode205Isomorphic StringsGiven two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a c
2016-06-13 22:36:54 389
原创 leetcode刷题,总结,记录,备忘 223
leetcode223Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.Ass
2016-06-07 14:06:35 284
原创 leetcode刷题,总结,记录,备忘 120
leetcode120TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[
2016-05-15 22:03:49 308
原创 leetcode刷题,总结,记录,备忘 329
leetcode329,Longest Increasing Path in a Matrix Given an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four directions: left,
2016-05-15 21:55:38 437
原创 leetcode刷题,总结,记录,备忘 345
leetcode345Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example
2016-05-10 22:05:07 483
原创 leetcode刷题,总结,记录,备忘 347
leetcode347Top K Frequent ElementsGiven a non-empty array of integers, return the k most frequent elements.For example,Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may a
2016-05-09 23:18:52 340
原创 leetcode刷题,总结,记录,备忘 343
leetcode343Integer BreakGiven a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.
2016-05-08 21:03:16 544
原创 leetcode刷题,总结,记录,备忘 301
leetcode301Remove Invalid ParenthesesRemove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.Note: The input string may contain
2016-05-02 20:23:00 618
原创 leetcode刷题,总结,记录,备忘 344
leetcode344Reverse String Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".Subscribe to see which co
2016-05-02 00:44:49 396
原创 leetcode刷题,总结,记录,备忘 201
leetcode201Bitwise AND of Numbers RangeGiven a range [m, n] where 0 For example, given the range [5, 7], you should return 4.Credits:Special thanks to @amrsaqr for adding this problem
2016-04-24 23:45:59 1319
原创 leetcode刷题,总结,记录,备忘109
leetcode109Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Subscribe to see
2016-04-24 00:51:35 360
原创 leetcode刷题,总结,记录,备忘 342
leetcode342Power of Four Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example:Given num = 16, return true. Given num = 5, return false.
2016-04-21 22:11:56 391
原创 leetcode刷题,总结,记录,备忘 8
leetcode8String to Integer (atoi) Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below
2016-04-19 23:31:52 275
原创 leetcode刷题,总结,记录,备忘 88
leetcode88,Merge Sorted ArrayGiven two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is great
2016-04-11 22:30:14 355
原创 leetcode刷题,总结,记录,备忘 90
leetcode90Subsets IIGiven a collection of integers that might contain duplicates, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The soluti
2016-04-10 23:40:58 233
原创 leetcode刷题,总结,记录,备忘 36
leetcode36Valid SudokuDetermine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'
2016-04-10 19:41:26 328
原创 leetcode刷题,总结,记录,备忘111
leetcode111Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest lea
2016-04-09 21:01:22 711
原创 leetcode刷题,总结,记录,备忘114
leetcode114Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6
2016-04-07 21:08:40 662
原创 unix环境高级编程(第三版)中apue.h文件的配置问题
最近刚开始学习unix环境高级编程(第三版),其中有个作者自己写的apue.h文件,在这归总下相应的配置方法,希望对有需要的朋友们有所帮助首先http://www.apuebook.com/code3e.html 上去下载相应的压缩包,注意自己书的版本。下载完成之后,鉴于大多数朋友学习linux都是基于虚拟机的,所以顺便附上虚拟机与本地主机传输文件的方式首先下载SSH
2016-04-04 16:40:56 5048
原创 leetcode刷题,总结,记录,备忘78
leetcode78SubsetsGiven a set of distinct integers, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplica
2016-03-24 23:10:30 259
原创 leetcode刷题,总结,记录,备忘 39
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 repeated number may be chosen from C unlimited numb
2016-03-22 22:57:37 384
原创 leetcode刷题,总结,记录,备忘 338
leetcode338Counting BitsGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an a
2016-03-20 22:53:18 293
原创 leetcode刷题,总结,记录,备忘, 279
leetcode279,Perfect SquaresGiven a positive integer n, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum to n.For example, given n = 12, return 3 b
2016-02-29 21:02:40 398
请问IVS_SDK_Login登录失败返回错误码为119101305是什么错误
2016-02-29
TA创建的收藏夹 TA关注的收藏夹
TA关注的人