链接:https://leetcode-cn.com/problems/sort-list/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNod ...
分类:
编程语言 时间:
2020-05-24 23:59:47
阅读次数:
102
链接:https://leetcode-cn.com/problems/reverse-linked-list/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; ...
分类:
其他好文 时间:
2020-05-24 23:53:03
阅读次数:
71
老套路了。 用二分求答案,judge时把每个点转换成矩形,最后看n个矩形是否有交点 #include<bits/stdc++.h> using namespace std; #define N 3005 #define ll long long struct Point{ll x,y;}c; str ...
分类:
其他好文 时间:
2020-05-24 19:27:58
阅读次数:
75
c++获取文件信息——_stat函数的使用 _stat函数的功能 _stat函数用来获取指定路径的文件或者文件夹的信息。 函数声明 [cpp] view plain copy int _stat( const char *path, struct _stat *buffer ); 参数: path— ...
分类:
其他好文 时间:
2020-05-24 14:02:25
阅读次数:
119
本期实现的功能很简单,协程的重头都在co_await和异步操作上,generator本身是一个很轻的东西如果你看到这行文字,说明这篇文章被无耻的盗用了(或者你正在选中文字),请前往 cnblogs.com/pointer-smq 支持原作者,谢谢基本结构generator和future/promis... ...
分类:
编程语言 时间:
2020-05-24 13:59:39
阅读次数:
102
题目:输入两棵二叉树A,B,判断B是不是A的子结构。(ps:我们约定空树不是任意一个树的子结构) 代码: 1 /* 2 struct TreeNode { 3 int val; 4 struct TreeNode *left; 5 struct TreeNode *right; 6 TreeNode ...
分类:
其他好文 时间:
2020-05-24 13:32:58
阅读次数:
44
题目:操作给定的二叉树,将其变换为源二叉树的镜像。 代码: 1 /* 2 struct TreeNode { 3 int val; 4 struct TreeNode *left; 5 struct TreeNode *right; 6 TreeNode(int x) : 7 val(x), lef ...
分类:
其他好文 时间:
2020-05-24 13:31:21
阅读次数:
51
使用这个结构体和方法时,需要引入:<sys/types.h><sys/stat.h>struct stat这个结构体是用来描述一个linux系统文件系统中的文件属性的结构。可以有两种方法来获取一个文件的属性:1、通过路径:int stat(const char *path, struct stat ...
分类:
其他好文 时间:
2020-05-24 13:23:03
阅读次数:
78
地址:https://leetcode-cn.com/problems/binode-lcci/ <?php /** 二叉树数据结构TreeNode可用来表示单向链表(其中left置空,right为下一个链表节点)。实现一个方法,把二叉搜索树转换为单向链表,要求值的顺序保持不变,转换操作应是原址的, ...
分类:
其他好文 时间:
2020-05-24 11:36:44
阅读次数:
57
https://www.learn-c.org/en/Linked_lists https://www.youtube.com/watch?v=VOpjAHCee7c used for dynamic data structure ...
分类:
其他好文 时间:
2020-05-24 09:21:24
阅读次数:
41