摘要: (想法偏了,以后回来重写) 官方解答: class Solution { public: bool repeatedSubstringPattern(string s) { return (s + s).find(s, 1) != s.size(); } }; 阅读全文
posted @ 2024-01-05 17:10 joyfulest 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 我的答案: class Solution { public: bool isAnagram(string s, string t) { int s1 = 0; int t1 = 0; for (char ss : s) { s1 += ss; } for (char tt : t) { t1 += 阅读全文
posted @ 2024-01-04 11:29 joyfulest 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 正常是应该手写KMP算法 哈哈哈哈 一道题算一天 ,最后先搁置吧,看完kmp再写 代码: class Solution { public: int strStr(string haystack, string needle) { return haystack.find(needle); } }; 阅读全文
posted @ 2024-01-03 16:29 joyfulest 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 我的答案: class Solution { public: char findTheDifference(string s, string t) { int s1 = 0, t1 = 0, val = 0; for (char ss : s) { int asciiValue = static_c 阅读全文
posted @ 2024-01-02 14:11 joyfulest 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 我的答案:(变量名随便起的,不规范) class Solution { public: string dayOfTheWeek(int day, int month, int year) { std::string site[7] = {"Monday", "Tuesday", "Wednesday 阅读全文
posted @ 2023-12-29 15:55 joyfulest 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 我的答案: class Solution { public: string result; int i=0,j=0; string mergeAlternately(string word1, string word2) { if(word1.length()<1||word2.length()>1 阅读全文
posted @ 2023-12-29 15:54 joyfulest 阅读(4) 评论(0) 推荐(0) 编辑
摘要: C++ Standard Library headers − C++ 标准库。 C++ Programming − 这本书涵盖了 C++ 语言编程、软件交互设计、C++ 语言的现实生活应用。 C++ FAQ − C++ 常见问题 Free Country − Free Country 提供了免费的 阅读全文
posted @ 2023-12-29 11:18 joyfulest 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1. 下载压缩包 cd命令到需要安装的目录下,可自行使用mkdir新建文件夹,我这里新文件夹为NGINX 执行下面命令下载:(如果操作没有权限提示找不到文件,可以使用命令su,并输入管理员密码进入root权限,或直接在语句前加sudo加一个空格再接需要的命令) wget https://nginx. 阅读全文
posted @ 2023-09-06 17:26 joyfulest 阅读(132) 评论(0) 推荐(0) 编辑
摘要: TCP(Transmission Control Protocol)是一种面向连接的、可靠的传输层协议,用于在计算机网络中传输数据。它是互联网协议套件中的一个重要协议,与IP(Internet Protocol)协议一起构成了TCP/IP协议栈的核心。 TCP协议提供了一种可靠的、面向字节流的传输机 阅读全文
posted @ 2023-05-24 17:09 joyfulest 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-04-20 10:25 joyfulest 阅读(35) 评论(2) 推荐(0) 编辑