C++实现LeetCode(36.验证数独)

[LeetCode] 36. Valid Sudoku 验证数独Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the fo...

2021-08-09

c语言中回调函数的使用以及实际作用详析

目录前言一、通过这节课程你能掌握以下知识:二、程序架构的核心理念和需求三、回调函数的作用1.输出型2.输入型四、掌握回调函数的程序编写总结前言今天给大家讲一下芯片/模...

2021-08-09

C++实现LeetCode(187.求重复的DNA序列)

[LeetCode] 187. Repeated DNA Sequences 求重复的DNA序列All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". W...

2021-08-09

C++实现LeetCode(91.解码方法)

[LeetCode] 91. Decode Ways 解码方法A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1
'B' -> 2
......

2021-08-09

C++实现LeetCode(93.复原IP地址)

[LeetCode] 93.Restore IP Addresses 复原IP地址Given a string containing only digits, restore it by returning all possible valid IP address combinations.Example:I...

2021-08-09

C++实现LeetCode(241.添加括号的不同方式)

[LeetCode] 241. Different Ways to Add Parentheses 添加括号的不同方式Given a string of numbers and operators, return all possible results from computing all the...

2021-08-09

C++实现LeetCode(82.移除有序链表中的重复项之二)

[LeetCode] 82. Remove Duplicates from Sorted List II 移除有序链表中的重复项之二Given a sorted linked list, delete all nodes that have duplicate numbers, leaving...

2021-08-09

vscode编译运行c语言报错乱码的解决

目录在这里先展示我遇到的报错顺序:解决报错的前提:报错1和2:报错3:报错4:在这里先展示我遇到的报错顺序:1、运行后出现乱码(不论是输出中文还是英文)
2、检测到 #include 错误。请...

2021-08-09

C++实现LeetCode(68.文本左右对齐)

[LeetCode] 68.Text Justification 文本左右对齐Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth&#1...

2021-08-09

C++实现LeetCode(72.编辑距离)

[LeetCode] 72. Edit Distance 编辑距离Given two words word1 and word2, find the minimum number of operations required to convert word1 t...

2021-08-09

C++实现LeetCode(76.最小窗口子串)

[LeetCode] 76. Minimum Window Substring 最小窗口子串Given a string S and a string T, find the minimum window in S which will contain all the characters in T in...

2021-08-09

C++实现LeetCode(81.在旋转有序数组中搜索之二)

[LeetCode] 81. Search in Rotated Sorted Array II 在旋转有序数组中搜索之二Suppose an array sorted in ascending order is rotated at some pivot unknown to you befo...

2021-08-09

C语言中结构体与内存对齐实例解析

1.结构体类型C语言中的2种类型:原生类型和自定义类型,结构体类型是一种自定义类型。2.结构体使用时先定义结构体类型再用类型定义变量-> 结构体定义时需要先定义结构体类型,然...

2021-08-09

C++实现LeetCode(136.单独的数字)

[LeetCode] 136.Single Number 单独的数字Given a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm...

2021-08-09

C++基于灰度图上色GrayToColorFromOther的实现

目录场景需求功能函数代码C++测试代码场景需求 之前有提到给灰度图上色的需求,在此基础上,还有一种需求,就是基于另一张参考灰度图的色板来给当前的灰度图上色,比如参考灰...

2021-08-09

C++实现LeetCode(312.打气球游戏)

[LeetCode] 312. Burst Balloons 打气球游戏Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represent...

2021-08-09

C++实现LeetCode(62.不同的路径)

[LeetCode] 62. Unique Paths 不同的路径A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The ro...

2021-08-09

C++实现LeetCode( 69.求平方根)

[LeetCode] 69. Sqrt(x) 求平方根Implement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative...

2021-08-09

C++实现LeetCode(79.词语搜索)

[LeetCode] 79. Word Search 词语搜索Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adj...

2021-08-09

C++实现LeetCode(87.搅乱字符串)

[LeetCode] 87. Scramble String 搅乱字符串Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively...

2021-08-09

C++ 递归遍历文件并计算MD5的实例代码

递归遍历文件夹,对比文件md5首先,需要引用 md5 的相关代码,参考这篇文章,防止链接内容被删除,这里再记录一次:
md5.h #ifndef MD5_H #define MD5_H #include <string> #...

2021-08-09

C++实现LeetCode(137.单独的数字之二)

[LeetCode] 137. Single Number II 单独的数字之二Given a&#160;non-empty&#160;array of integers, every element appears&#160;three&#160;times except for one, which...

2021-08-09

C++实现LeetCode(96.独一无二的二叉搜索树)

[LeetCode] 96. Unique Binary Search Trees 独一无二的二叉搜索树Given&#160;n, how many structurally unique&#160;BST's&#160;(binary search trees) that store values...

2021-08-09

C++实现LeetCode(74.搜索一个二维矩阵)

[LeetCode] 74. Search a 2D Matrix 搜索一个二维矩阵Write an efficient algorithm that searches for a value in an&#160;m x n&#160;matrix. This matrix has the follo...

2021-08-09

C++实现LeetCode(141.单链表中的环)

[LeetCode] 141. Linked List Cycle 单链表中的环Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an in...

2021-08-09

Opencv开发实现拼图游戏

本文实例为大家分享了Opencv开发实现拼图游戏的具体代码,供大家参考,具体内容如下一、代码#include<opencv2/opencv.hpp>#include<iostream>#include<stdlib.h>#include<time....

2021-08-09

C++实现骑士走棋盘算法

本文实例为大家分享了C++实现骑士走棋盘算法的具体代码,供大家参考,具体内容如下1.问题描述骑士旅游Knight tour在十八世纪初倍受数学家与拼图迷的注意,它什么时候被提出已不可...

2021-08-09

C语言模拟实现动态通讯录

目录1.模拟实现通讯录总体架构一览图2.文件执行任务3.分模块实现 测试模块 test.c头文件 功能函数声明 contact.h功能函数逐一实现1.模拟实现通讯录总体架构一览图2.文件执...

2021-08-09

C++实现LeetCode(106.由中序和后序遍历建立二叉树)

[LeetCode] 106. Construct Binary Tree from Inorder and Postorder Traversal 由中序和后序遍历建立二叉树Given inorder and postorder traversal of a tree, construct...

2021-08-09

C/C++中指针的深入理解

目录计算机的内存模型
指针与指针常量
指针变量和指针常量
指针变量和数组
函数指针
C++中的引用
传值还是传引用
C++中的new关键词
总结计算机的内存模型
CPU是计算机的核...

2021-08-09

老生常谈c++中的静态成员

引言有时候需要类的一些成员与类本身相关联,而不是与类的每个对象相关联。比如类的所有对象都要共享的变量,这个时候我们就要用到类的静态成员。声明类的静态成员声明静态成员...

2021-08-09

C++实现LeetCode(101.判断对称树)

[LeetCode] 101.Symmetric Tree 判断对称树Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary t...

2021-08-09

C++实现LeetCode(104.二叉树的最大深度)

[LeetCode] 104. Maximum Depth of Binary Tree 二叉树的最大深度Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the long...

2021-08-09

C语言转义字符详解

####1.认识转义字符所有的ASCII码都可以用“\”加数字(一般是8进制数字)来表示。而C中定义了一些字母前加""来表示常见的那些不能显示的ASCII字符,如\0,\t,\n等,就称为转义字符,...

2021-08-09

C++实现LeetCode(889.由先序和后序遍历建立二叉树)

[LeetCode] 889. Construct Binary Tree from Preorder and Postorder Traversal 由先序和后序遍历建立二叉树Return any binary tree that matches the given preorder and...

2021-08-09

C++实现LeetCode(143.链表重排序)

[LeetCode] 143.Reorder List 链表重排序Given a singly linked list&#160;L:&#160;L0→L1→…→Ln-1→Ln,
reorder it to:&#160;L0→Ln→L1→Ln-1→L2→Ln-2→…You may&#1...

2021-08-09

C语言版三子棋小游戏

本文实例为大家分享了C语言版三子棋小游戏的具体代码,供大家参考,具体内容如下①游戏效果 有一个3*3的棋盘 每次下棋后(电脑和玩家),棋盘会更新数据 会有菜单提示相...

2021-08-09

C++实现批量图片拼接

本文实例为大家分享了C++实现批量图片拼接的具体代码,供大家参考,具体内容如下/**函数功能:不同图片拼接 * 参数: * vector<string> pic_list : 图片名称列表...

2021-08-09

OpenCV实现拼图算法

本文实例为大家分享了OpenCV实现拼图算法的具体代码,供大家参考,具体内容如下编程环境:VS2012+OpenCV2.4.6功能:第一种是将指定三幅图的指定位置的像素直接搬移到新的图像上第二...

2021-08-09

关于C语言和命令行之间的交互问题

在Windows操作系统中,后缀为.exe的文件都是可执行文件。.exe是英文单词executable的缩写,意思是可执行的。凡是可执行的文件都是二进制的文件,计算机也只能识别二进制的文件。...

2021-08-09

C++实现LeetCode(145.二叉树的后序遍历)

[LeetCode] 145. Binary Tree Postorder Traversal 二叉树的后序遍历Given a binary tree, return the postorder traversal of its nodes' values.For example:
Given bina...

2021-08-09

C++实现LeetCode(102.二叉树层序遍历)

[LeetCode] 102. Binary Tree Level Order Traversal 二叉树层序遍历Given a binary tree, return the&#160;level order&#160;traversal of its nodes' values. (ie, from...

2021-08-09

C++实现LeetCode(103.二叉树的之字形层序遍历)

[LeetCode] 103. Binary Tree Zigzag Level Order Traversal 二叉树的之字形层序遍历Given a binary tree, return the&#160;zigzag level order&#160;traversal of its nod...

2021-08-09

C语言之函数返回值与参数传递案例教程

C语言函数返回值与参数传递一:参数传递C语言的函数中必不可少的就是参数传递,可以采用传值和传指针两种方式。
1.传值的形式:只是将参数值的拷贝传给函数,并非参数本体如:int tes...

2021-08-09

C语言中操作sqlserver数据库案例教程

本文使用c语言来对sql server数据库进行操作,实现通过程序来对数据库进行增删改查操作。操作系统:windows 10 &#160; &#160; &#160; &#160; 实验平台:vs2012&#160; +&#160; sql...

2021-08-09

C++实现LeetCode(105.由先序和中序遍历建立二叉树)

[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal 由先序和中序遍历建立二叉树Given preorder and inorder traversal of a tree, construct th...

2021-08-09

C++实现LeetCode(109.将有序链表转为二叉搜索树)

[LeetCode] 109.Convert Sorted List to Binary Search Tree 将有序链表转为二叉搜索树Given a singly linked list where elements are sorted in ascending order, conver...

2021-08-09

C++实现LeetCode(142.单链表中的环之二)

[LeetCode] 142. Linked List Cycle II 单链表中的环之二Given a linked list, return the node where the cycle begins. If there is no cycle, return&#160;null.To repr...

2021-08-09

c++中的基本IO类型详解

引言c++不直接处理输入和输出,而是通过标准库中的类型处理IO。IO的设备可以是文件、控制台、string。c++主要定义了三种IO类型,分别被包含在iostream、fstream、sstream头文...

2021-08-09

TypeScript的函数定义与使用案例教程

TypeScript中函数的定义和使用1. 声明一个函数约束其传参类型,以及返回值类型 传入两个参数,没有返回值const fun1 = (key: string, value: number): void => { console.log(k...

2021-08-09
返回顶部
顶部