C++
文章平均质量分 52
qinshuiyiyi
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
归并排序及其时间复杂度分析
1.归并排序的步骤如下: Divide: 把长度为n的输入序列分成两个长度为n/2的子序列。 Conquer: 对这两个子序列分别采用归并排序。 Combine: 将两个排序好的子序列合并成一个最终的排序序列。2.时间复杂度: 这是一个递推公式(Recurrence),我们需要消去等号右侧的转载 2015-04-11 23:08:35 · 768 阅读 · 0 评论 -
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2015-04-14 22:24:30 · 365 阅读 · 0 评论 -
Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321class Solution {public: int reverse(int x) { long long int res = 0; while(原创 2015-05-11 21:20:07 · 404 阅读 · 0 评论 -
String 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 and ask yourself what are the possible input ca原创 2015-05-12 22:27:59 · 397 阅读 · 0 评论 -
Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.1221 -> true-1221 -> falseclass Solution {public: bool isPalindrome(int x) { if(x < 0) return false;原创 2015-05-13 21:49:33 · 390 阅读 · 0 评论 -
ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I原创 2015-05-07 22:14:21 · 297 阅读 · 0 评论 -
虚拟机启动Ubuntu失败 module devicepoweron power on failed
今天打开虚拟机想重新启动Ubuntu遇到这个问题:网上搜索后,解决方案如下:1.根据初始启动页面下的信息,在本地找到Ubuntu.vmx文件: 2.编辑该文件:将 vmci0.present = "true" 改为false原创 2015-06-13 10:29:39 · 3648 阅读 · 1 评论
分享