-
c++对象的特殊成员函数
-
智能指针的简单实现
shared_ptr的简单实现(非线程安全)主要包括以下成员函数: 构造函数 析构函数 拷贝构造函数 operator=() operator*() operator->() 12345678910111213141... -
面试常见的排序
一、快速排序 快速排序平均时间复杂度为o(nlogn),最坏时间复杂度为o(n^2),不稳定; 主要可以通过以下几种方式来优化: 三数取中,使选择的“标杆”能够尽量的将数组平均划分成两半,避免选择到边界值使时间复杂度退化到o(n^2); ... -
c++拷贝构造函数为什么可以访问另一个对象的私有成员
123456789101112131415161718192021222324252627class Test{public: /* 默认构造函数 */ Test(int _value = 0):value(_value)&... -
根据数组生成二叉树
定义二叉树123456struct TreeNode{ int val; TreeNode* left; TreeNode* right; TreeNode(int _val):val(_val){}... -
单例模式
饿汉模式123456789101112131415161718192021222324252627#include <iostream>using namespace std;class HungrySingleton{priv... -
hexo+github搭建自己的博客
准备工作GitHub账号注册一个github账号 GitHub申请账号 安装Git Git安装(Windows) 安装NodeJSNodeJS安装及配置(Windows) 创建仓库 在GitHub上创建一个新的代码仓库用于保存我们的网页。 点击Y... -
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, yo...
岁月静好 留恋已去