自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 资源 (1)
  • 收藏
  • 关注

原创 SQL TASK 04

2022-05-26 01:34:41 136

原创 ch01: 初识数据库

练习题1.1编写一条 CREATE TABLE 语句,用来创建一个包含表 1-A 中所列各项的表 Addressbook (地址簿),并为 regist_no (注册编号)列设置主键约束表1-A 表 Addressbook (地址簿)中的列CREATE TABLE Addressbook (register_no int NOT NULL,name VARCHAR(128) NOT NULL,address VARCHAR(256) NOT NULL,tel_no CHAR(10),mai

2022-05-17 00:29:25 321

原创 Leetcode 852. 山脉数组的峰顶索引

文章目录题目链接代码二分枚举暴力枚举题目链接852. 山脉数组的峰顶索引代码二分枚举int peakIndexInMountainArray(int* arr, int arrSize){ int l = 1, r = arrSize - 2, mid, ret; while (l <= r) { mid = l + (r - l >> 1); // 1 if (arr[mid] > arr[mid + 1]) {

2022-04-12 02:49:10 352

原创 Leetcode 744. 寻找比目标字母大的最小字母

文章目录题目链接代码二分查找题目链接744. 寻找比目标字母大的最小字母代码二分查找char nextGreatestLetter(char* letters, int lettersSize, char target){ int left = 0, right = lettersSize - 1; int ans = 0; // 1 while (left <= right) { int mid = left + right >> 1;

2022-04-11 00:30:06 461

原创 Leetcode 167. 两数之和 II - 输入有序数组

文章目录题目链接代码法一 暴力枚举超时法二 二分查找题目链接167. 两数之和 II - 输入有序数组代码法一 暴力枚举超时/** * Note: The returned array must be malloced, assume caller calls free(). */int* twoSum(int* numbers, int numbersSize, int target, int* returnSize){ int *ret = (int*)malloc(sizeof

2022-04-10 23:07:15 322

原创 Leetcode 374. 猜数字大小

文章目录题目链接代码法一 暴力枚举超时法二 二分查找题目链接374. 猜数字大小代码法一 暴力枚举超时/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is lower than the guess number * 1 if num is higher than the guess number * oth

2022-04-10 22:58:43 189

原创 Leetcode 704. 二分查找

文章目录题目链接代码法一 暴力枚举法二 二分查找题目链接704. 二分查找代码法一 暴力枚举int search(int* nums, int numsSize, int target){ for (int i = 0; i < numsSize; ++i) { if (target == nums[i]) return i; } return -1;}法二 二分查找int search(int* nums, int n

2022-04-10 22:46:21 167

原创 Leetcode 1941. 检查是否所有字符出现次数相同

文章目录题目链接代码题目链接1941. 检查是否所有字符出现次数相同代码int cmp_str(const void *a, const void *b) { return strcmp(a, b);}bool areOccurrencesEqual(char * s){ int n = 1; qsort(s, strlen(s), sizeof(char), cmp_str); /* for (int i = 0; i < strlen(s); +

2022-04-06 08:19:03 610

原创 Leetcode LCP 44. 开幕式焰火

文章目录题目链接代码法一利用uthash法二哈希表题目链接LCP 44. 开幕式焰火代码法一利用uthash/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */struct my_struct { int id;

2022-04-05 20:58:14 362

原创 Leetcode 389. 找不同

文章目录题目链接代码题目链接389. 找不同代码int cmp(const void* p1, const void* p2) { return *(char *)p1 - *(char *)p2; // 注意必须是char *,不能是int *}char findTheDifference(char * s, char * t){ qsort(s, strlen(s), sizeof(char), cmp); qsort(t, strlen(t), sizeof(cha

2022-04-05 01:58:45 559

原创 Leetcode 1608. 特殊数组的特征值

文章目录题目链接代码生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入题目链接1608. 特殊数组的特征值代码int cmp(const void* p1, const void* p2) { return *(int *)p1 - *(int *)p2; }int specialArray(int* nums

2022-04-05 00:29:47 289

原创 位运算技巧

逻辑位运算符位与(&)位或(|)异或(^)异或也叫半加运算,其运算法则相当于不带进位的二进制加法:二进制下用1表示真,0表示假,则异或的运算法则为:0⊕0=0,1⊕0=1,0⊕1=1,1⊕1=0(同为0,异为1),这些法则与加法是相同的,只是不带进位,所以异或常被认作不进位加法。若需要交换两个变量的值,除了通常使用的借用中间变量进行交换外,还可以利用异或,仅使用两个变量进行交换,如:void swap(int &a,int &b){ a=a^.

2022-03-16 23:47:10 171

原创 Depth-First Search(深度优先搜索)

This search algorithm is specially designed for graphs and trees.As you may recall, a Graph is a set of connected nodes where each node is called a vertex and the connection between two of them is called an edge. While a tree is basically the same with t

2022-03-14 10:32:28 1239

原创 Python小知识

Operator//print(5//0.5) # 10.02 == 2.0 is Trueis关键字The is keyword is used to test if two variables refer to the same object.The test returns True if the two objects are the same object.The test returns False if they are not the same object, even

2022-03-13 04:00:26 1033

原创 C语言疑难杂症

文章目录结构体结构体C 不支持结构体比较。必须通过一一比较所有成员来比较结构体structs are not valid operands for equality(==), the operands have to be an arithmetic type or a pointer. We can see this from the draft C99 standard section 6.5.9 Equality operators:One of the following shall hol

2022-03-12 03:34:30 783

原创 C语言第八章The Preprocessor

文章目录Preprocessor Directives(指令)The #include DirectiveThe #define DirectiveFormatting Preprocessor DirectivesPredefined Macro DefinitionsConditional Compilation DirectivesThe #ifdef, #ifndef, and #undef DirectivesConditional Compilation DirectivesPreprocess

2022-03-11 08:26:25 266

原创 抖音小视频杂技解析

文章目录batvbs更改快捷方式图标bat在cmd输入start http://cybermap.kaspersky.com/,或者file.bat文件里输入,即相当于在浏览器里打开该网址批处理文件,在DOS和Windows(任意)系统中,.bat文件是可执行文件,由一系列命令构成,其中可以包含对其他程序的调用。这个文件的每一行都是一条DOS命令(大部分时候就好像我们在DOS提示符下执行的命令行一样),你可以使用DOS下的Edit或者Windows的记事本(notepad)等任何文本文件编辑工具创建和

2022-03-10 06:24:12 663

原创 【C语言第七章Files & Error Handling】

文章目录Working With FilesAccessing FilesWorking With FilesAccessing FilesAn external file can be opened, read from, and written to in a C program. For these operations, C includes the FILE type for defining a file stream. The file stream keeps track of whe

2022-03-09 14:03:30 1019

原创 C语言小知识

目录C中未初始化的变量,默认值是多少?C语言中定义int变量,默认值是多少?C语言中有bool变量吗?5 == 5.0?取值运算符* 优先级高于+逗号运算符的优先级最低,从左到右计算,例如(5,3,0)结果为0,(0,3,5)结果为5printf函数的返回值是输出的长度C中未初始化的变量,默认值是多少?int, char, float, double,C语言中定义int变量,默认值是多少?区分变量的类型,有两种情况:1 局部变量。局部变量.

2022-03-09 01:50:01 1384

原创 【VSCODE 配置C\C++环境】

文章目录配置环境变量https://winlibs.com/输入cmd回车配置环境变量按F5选择C++ (GDB/LLDB)查看launch.json文件“name”“type”“program”“externalConsole”“MIMode”“miDebuggerPath”“preLaunchTask”(匹配tasks.json里的"label")查看tasks.json文件...

2022-03-07 06:50:28 300

原创 C语言第六章Memory Management

文章目录Working With MemoryMemory ManagementMemory Management FunctionsThe malloc FunctionThe free Functioncalloc and reallocThe calloc FunctionWorking With MemoryMemory ManagementUnderstanding memory is an important aspect of C programming. When you declar

2022-03-03 12:10:22 240

原创 [学习报告]《LeetCode零基础指南》(第一讲) 函数

[学习报告]《LeetCode零基础指南》(第一讲) 函数正在上传…重新上传取消码上起飞2022-02-08 13:46:52TOC(xxx)# 一、今日知识点总结1.异或也叫半加运算,其运算法则相当于不带进位的二进制加法:二进制下用1表示真,0表示假,则异或的运算法则为:0⊕0=0,1⊕0=1,0⊕1=1,1⊕1=0(同为0,异为1),这些法则与加法是相同的,只是不带进位,所以异或常被认作不进位加法2.Left Shift :<< Takes t...

2022-03-03 07:15:56 73

原创 C语言第五章Structures & Unions

文章目录StructuresDeclarations Using StructuresAccessing Structure MembersUsing typedefWorking With StructuresStructures with StructuresPointers to StructuresStructures as Function ParametersArray of Structures(未完)UnionsAccessing Union MembersStructures With U

2022-03-02 10:43:09 674

原创 C语言第三章Functions, Arrays & Pointers

C语言第三章Functions, Arrays & PointersFunctionsFunctions in CFunction ParametersVariable Scope(作用域)Static Variables(静态变量)Recursive(递归的) FunctionsArraysArrays in CFunctionsFunctions in CDeclarations usually appear above the main() function and take the f

2022-02-28 01:50:59 598

原创 C语言第二章Conditionals and Loops

文章目录ConditionalsRelational Operators(关系运算符)Conditional Expressions(条件表达式)Nested if Statements(嵌套 if 语句)The if-else if StatementThe switch StatementLogical Operators(逻辑运算符)The && OperatorThe ! OperatorThe while LoopThe do-while Loopbreak and continu

2022-02-21 12:34:08 487

原创 【C语言第一章基本概念】

目录基本概念输入输出输入输出Formatted InputFormatting Output基本概念输入输出输入C supports a number of ways for taking user input.getchar() Returns the value of the next single character input.#include <stdio.h>int main() { char a = getchar(); printf("You e

2022-02-20 05:16:49 466 2

原创 C语言调试的四种方式

一. 编译器警告:1. 默认, 编译器不生成所有警告。2.使用 gcc -Wall二. printf语句1.Print to stderr instead of stdout        •fprintf(stderr, ….)三. assert"assert" macro provided by standard library        •Prints e...

2018-09-14 13:38:14 3286

转载 C语言里puts函数

puts函数(末尾的s取自string)puts函数可以按顺序输出作为实参的字符串,并在结尾换行。printf        可进行格式设定和数值的输出等,需要显式指定输出换行符puts        不可进行格式设定和数值的输出等,自动输出换行符。puts函数的实参只能有一个。转自    明解c第一章...

2018-07-14 08:27:49 2533

原创 明解c 英文单词

source program    源程序source file    源文件diagnostic message    诊断消息comment    注释stdio    standard I/O    标准输入输出printf    f源自format(格式化)function call    函数调用argument    实参%d    d源自decimal(十进制数)statement ...

2018-07-13 03:15:36 192

原创 C语言里文字颜色色和背景颜色设置

代码演示#include <stdio.h>#include <stdlib.h> //为了用system函数,#include <windows.h> //为了用Sleep函数,也可以用system函数,例如system("cls")清屏或者system("color f5")等;int main() { system("color ...

2018-06-16 09:08:29 17736 1

VisualBasic6.0程序设计CAP quiz1

自己写的第一次答题就全对哈哈,有不会的可以私信我,

2018-06-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除