- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 简单的单链表反转程序
时间复杂度O(n) 空间复杂度O(1) #include <iostream> #include <unistd.h> #include <stdio.h> using namespace std; typedef struct _li_s { _li_s *next; int data; }li_s; int main() { li_s *ph = NULL; li_s *pn = NULL; li_s *pc = NU...
2022-05-26 21:03:55
151
转载 设计模式七大原则(C++描述)
设计模式七大原则(C++描述) 前言 最近在学习一些基本的设计模式,发现很多博客都是写了六个原则,但我认为有7个原则,并且我认为在编码中思想还是挺重要,所以写下一篇博客来总结下 之后有机会会写下一些设计模式的博客(咕咕咕........ 设计模式的七大原则 1.单一职责原则 2.开放-封闭原则 3.依赖倒置原则 4.里氏替换原则(LSP) 5.接口隔离原则 6.迪米特原则(最少知道原则) 7.合成复用原则 1.单一职责原则 准确解析:就一个类而言,应该仅有一个引起它变化的原因 当
2021-10-09 11:39:51
268
原创 linux 增加swap分区
https://ubuntu.forumming.com/question/11894/how-to-increase-swap-space
2021-09-28 11:30:04
315
原创 数据结构 栈
//#pragma once #include "stdafx.h" #define MAXLEN 100 typedef struct { char ch; int flag; }sltype; typedef struct { sltype *base; sltype *top; int stacksize; }sqstack; bool initstack(sqstack...
2019-01-21 10:54:37
111
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅