- 博客(11)
- 资源 (23)
- 收藏
- 关注
原创 C++ primer 5 笔记4 chapter 4 表达式
4.1 基础要求 二元运算符两侧的数据类型 相同 或者可以转化成 同一类型左值, 使用对象的身份, 即其在内存中的地址右值, 即使用对象的值decltype 作用于表达式(非变量) 得到一个引用类型int * p = nullptr;decltype(p) // int *decltype(*p) // int &, 这个自己没想明白, 个人感觉应该是 intdecltype
2015-09-28 16:52:19 346
原创 LeetCode OJ9 Palindrome Number 小结
Palindrome Number题目描述Determine whether an integer is a palindrome. Do this without extra space解题思路我们的基本思路就是, 把这个数字提取出每个位上的数字,分别压入数组中去, 然后从两端向中间看去, 判断是否是回文数字my codeclass Solution {public: bool isPa
2015-09-23 16:33:58 430
原创 LeetCode OJ8 String to Integer (atoi) 小结
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 ar
2015-09-23 10:20:33 477
原创 LeetCode OJ7 Reverse Integer 小结
Reverse Integer问题描述Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321解题思路正常的数字翻转, 并检验溢出, 同时注意构造数据的时候, 用大一号的数据类型来容纳数据。我们的代码class Solution {public: int revers
2015-09-22 20:48:58 410
原创 leetcode OJ6 ZigZag Conversion 小结
ZigZag Conversion今天把自己吓一跳, leetcode上已经刷到22题了, csdn上才总结了 5 题, 赶紧停下来, 写下总结, 并看看大神的代码。问题描述The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to d
2015-09-22 20:40:23 379
原创 C++ primer 5 笔记3 chapter 3 字符串, 向量和数组
chapter 3 字符串, 向量和数组命名空间的using 声明头文件中请不要包含using 声明, 因为, 头文件中的内容会被拷贝到引用它的文件中去。标准库类型string如果一个表达式中已经有了size()函数, 就不要再使用int了标准库类型vector范围 for 语句体内不应该改变其所遍历的序列的大小注意避免下标越界 ( 缓冲区溢出问题)迭代器介绍cbegin, cend
2015-09-20 20:47:39 354
原创 LeetCode OJ5 Longest Palindromic Substring 小结
Longest Palindromic Substring问题描述最长回文字串Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromi
2015-09-16 18:01:29 339
原创 LeetCode OJ4 Median of Two Sorted Arrays 小结
Median of Two Sorted Arrays问题描述There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n))
2015-09-14 19:46:09 464
原创 LeetCode OJ 3 Longest Substring Without Repeating Characters 小结
Longest Substring Without Repeating CharactersQuestionGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters
2015-09-10 20:02:46 417
原创 LeetCode OJ2 Add Two Numbers 小结
Add Two Numbers 问题描述You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and
2015-09-09 17:32:49 438
原创 leetcode OJ1 Two Sum求解小结
Introduction最近实验室的师兄们开始找工作了, 想到自己也快了, 于是打算从现在准备起来, 于是我看上了LeetCode, 开刷,这是第一题。Question 1 Two SumLeetCode Two Sum Given an array of integers, find two numbers such that they add up to a specific target nu
2015-09-07 20:33:54 514
ImageWatch
2017-01-03
30天自制操作系统 pdf part1
2016-11-22
30天自制操作系统 电子书 part2
2016-11-22
30天自制操作系统的光盘part1
2016-11-22
winHex18.5 x86_x641
2016-11-22
chatbot3 源码
2016-11-19
8皇后问题七届源代码
2015-05-19
vs2013+opencv2.4.9配置环境
2015-05-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人