![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
-----数据结构-----
文章平均质量分 73
朱铭德
在AR赛道安安静静减肥
展开
-
算法与数据结构基础----表,栈和队列(外加map用法)
本文为《数据结构与算法分析-C语言分析》Mark Allen Weiss 的读书笔记 Chapter3Chapter 3 表,栈和队列 这部分主要介绍: ○抽象数据类型(ADT)的概念 ○阐述如何对表进行有效操作 ○介绍栈ADT以及在递归里的应用 ○介绍队列ADT在操作系统和算法设计中的应用原创 2016-11-29 16:00:11 · 1132 阅读 · 0 评论 -
【LeetCode013算法/编程练习C++】Roman to Integer //难得击败了80%的人
罗马数字转整数int原创 2016-12-29 19:37:13 · 1532 阅读 · 0 评论 -
【LeetCode014-015算法/编程练习C++】最长共同前缀,3Sum(和为0) //用到了map的自动排序
LeetCode14和15题原创 2016-12-30 17:28:58 · 871 阅读 · 0 评论 -
【LeetCode018-020】4Sum,单链表Nth去除,符号检测//指针与引用,stack用法
18-20 LeetCode解题 Total Accepted: 100564Total Submissions: 391517Difficulty: MediumContributors: AdminGiven an array S of n integers, are there elements a, b, c, and d in S such tha原创 2017-01-13 11:52:11 · 570 阅读 · 0 评论 -
提高C++程序运行效率的10个简单方法
C++提高效率的几个技巧转载 2017-02-27 11:14:35 · 1782 阅读 · 0 评论 -
字符串匹配(find函数,KMP算法,Sunday算法)
字符串匹配原创 2017-03-30 19:41:46 · 2309 阅读 · 0 评论 -
算法与数据结构基础 -- 排序 (C++实现)
常见的排序算法原创 2017-04-16 20:20:05 · 432 阅读 · 0 评论 -
2017百度春季实习生五道编程题[全AC]
百度2017实习生招聘编程题原创 2017-04-27 23:42:30 · 2730 阅读 · 2 评论 -
单链表成环问题
链表成环相关问题原创 2017-07-03 16:27:05 · 1479 阅读 · 0 评论 -
看看C++快排(sort)源码
看看STL sort源码~原创 2017-07-25 15:57:29 · 12376 阅读 · 5 评论 -
unordered_map及map访问键值速率对比
map和unordered_map访问键值速率比较电脑配置如下:测试代码如下:计时方法:C++11 chrono#include#include#include#includeusing namespace std;int main() { unordered_map无序;//unordered_map以哈希表存储 map有序;//map原创 2017-07-25 16:58:37 · 5314 阅读 · 1 评论 -
【LeetCode012算法/编程练习C++】Integer to Roman //map的遍历&数组的妙用
int和罗马数字互相转化原创 2016-12-28 11:15:23 · 868 阅读 · 0 评论 -
【LeetCode016-017算法/编程练习C++】3Sum Closest,九宫格输入法//Sort函数
LeetCode十六和十七题原创 2017-01-04 11:59:01 · 1079 阅读 · 0 评论 -
数据结构与算法分析基础----概念初步&最大子序和四种算法C++实现&对分查找&欧几里德算法
本文为《数据结构与算法分析-C语言分析》Mark Allen Weiss 前两章的读书笔记 用C++重写了书里的C语言例子原创 2016-11-28 16:55:24 · 782 阅读 · 0 评论 -
【LeetCode004-005算法/编程练习C++】--两个数组的中间数,找出最长回文子串
LeetCode第四五题原创 2016-12-22 14:23:28 · 635 阅读 · 0 评论 -
【LeetCode231算法/编程练习C++】--判断是否是2的整数次幂 //按位与&的用处
LeetCode第231条,按位与的作用Given an integer, write a function to determine if it is a power of two.LeetCode第231题:判断一个数字n是不是2的整数幂:第一种解法://简单无脑while(n)除以2,时间复杂度O(logn) bool isPowerOfTwo(原创 2016-12-19 13:59:12 · 1529 阅读 · 0 评论 -
【LeetCode002-003算法/编程练习C++】---Add Two Numbers||寻找最长无重复字母子串。//第三题之后有空要再想一想…
leetcode第2和第3题原创 2016-12-22 14:19:08 · 780 阅读 · 0 评论 -
【LeetCode006算法/编程练习C++】ZigZag Conversion //折形string重新排序
LeetCode第六题原创 2016-12-22 17:00:36 · 557 阅读 · 0 评论 -
【LeetCode007算法/编程练习C++】数字逆序(atol)
LeetCode第七题原创 2016-12-23 10:53:27 · 877 阅读 · 0 评论 -
【LeetCode008-009算法/编程练习C++】string转int(atoi),判断数字是否是回文
LeetCode 8-9原创 2016-12-23 12:06:11 · 701 阅读 · 0 评论 -
【LeetCode001算法/编程练习C++】--twoSum //从816ms到16ms的优化过程
LeetCode第一题原创 2016-12-19 10:21:18 · 694 阅读 · 0 评论 -
【LeetCode010算法/编程练习C++】Regular Expression Matching//挺烦的一条……
10. Regular Expression MatchingTotal Accepted: 113015 Total Submissions: 481908 Difficulty: Hard Contributors: AdminImplement regular expression matching with support for '.' a原创 2016-12-27 16:09:14 · 1976 阅读 · 0 评论 -
【LeetCode011算法/编程练习C++】Container With Most Water //移动最小板
LeetCode第11题原创 2016-12-27 16:24:38 · 576 阅读 · 0 评论 -
int转string的多种方式
1.int a = 10;char *intStr = itoa(a);string str = string(intStr);2.int a = 10;stringstream ss;ss << a;string str = ss.str();3. C++11 (推荐,如果支持的话)#include <string> std::string s = std...原创 2018-05-19 14:29:09 · 16451 阅读 · 5 评论