摘要: // ConsoleApplication62.cpp : This file contains the 'main' function. Program execution begins and ends there. // #pragma warning(disable:4996) #inclu 阅读全文
posted @ 2021-03-14 12:24 siyu1915 阅读(139) 评论(0) 推荐(0)
摘要: 算是第一个独立完成的中等题了。对二叉树进行一次先序遍历即可。 class Solution { public: TreeNode *targetNode; TreeNode *resultNode; TreeNode *getTargetCopy(TreeNode *original, TreeNo 阅读全文
posted @ 2021-02-25 18:11 siyu1915 阅读(60) 评论(0) 推荐(0)
摘要: 排序的方法比较巧妙: 1 #include <stdio.h> 2 #include <malloc.h> 3 #include <string.h> 4 5 void str_sort(char **strs, int size) { 6 char *dest1 = (char *) malloc 阅读全文
posted @ 2021-02-25 18:06 siyu1915 阅读(343) 评论(0) 推荐(0)
摘要: 一、Database和Table 1.操作Database: (1)查看MySQL已存在的所有数据库:show databases; (2)create database XXX;其中XXX为自定义的Database名称。 (3)如果XXX名称已存在,(1)的SQL语句会报错。可以用下面语句提前判断 阅读全文
posted @ 2021-02-03 18:17 siyu1915 阅读(39) 评论(0) 推荐(0)
摘要: 一、算法思路 LRUCache类有以下函数和变量: LRUCache(int capacity): capacity是当前对象能够存储的键值对(key,value)最大个数。 int get(int key): 根据指定的key寻找value值,若没有找到key就返回-1 void put(int 阅读全文
posted @ 2021-02-02 15:53 siyu1915 阅读(379) 评论(0) 推荐(2)
摘要: 如下图,“PS C:\Windows\System32\drivers\etc>” 就是PowerShell的输入提示符,默认是显示“PS”加上当前所在的地址。 如果我们想修改输入提示符的内容,首先要在当前Windows用户的“文档”目录下的“WindowsPowerShell”里面创建一个“Mic 阅读全文
posted @ 2021-02-01 23:25 siyu1915 阅读(484) 评论(0) 推荐(0)
摘要: python 官网:https://www.python.org/ 下载地址:https://www.python.org/downloads/ 注意:python 分为 python 2 和 python 3 两个版本 运行python:Win + R →输入“cmd”→命令行内输入python→ 阅读全文
posted @ 2018-01-06 15:13 siyu1915 阅读(308) 评论(0) 推荐(0)
摘要: 一、冒泡排序 C 语言 C++ 二、选择排序 C 语言 C++ 三、插入排序 C 语言 C++ template <typename BidirectionalIterator>void insertion_sort(BidirectionalIterator __first, Bidirectio 阅读全文
posted @ 2017-10-04 17:43 siyu1915 阅读(95) 评论(0) 推荐(0)
摘要: httpd.conf httpd-vhosts.conf 阅读全文
posted @ 2017-07-30 11:15 siyu1915 阅读(114) 评论(0) 推荐(0)
摘要: 1.用Requests爬去你想要的爬取的网站 1 2 3 4 import requests r = requests.get('https://www.baidu.com') print r.text # 打印网站源代码 import requests r = requests.get('http 阅读全文
posted @ 2017-07-24 08:20 siyu1915 阅读(117) 评论(0) 推荐(0)