来自题目的思考
来自最近的题目的思考
头发存活率
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
链表在计算机中的储存形式
List L;是定义一个指针,储存一个int类型的地址,没有数据域,当然他自己也有一个储存的地址,但是这不重要原创 2021-02-08 09:38:37 · 881 阅读 · 0 评论 -
&和|运算符
public class MySolution{ public static void main(String args[]) { System.out.println(1&0); System.out.println(1&1); System.out.println(0&1); System.out.println(0&0); System.out.println(1|0); System.out.println(1|1); System原创 2021-01-30 12:53:59 · 152 阅读 · 0 评论 -
小知识点:clock()函数的应用
比较函数的运行时长#include<iostream>#include<time.h>using namespace std;clock_t strat, stop;double duration;double f1(int n, double a[], double x) { int i; double p = a[0]; for (i = 1; i <= n; i++) p += (a[i] * pow(x, 1)); ret...原创 2020-07-01 12:47:27 · 332 阅读 · 0 评论 -
最大子列和问题的四种算法附世界未解之谜(就是本菜鸡不懂=_=)
#include<iostream>#include<time.h>using namespace std;#define MAXSIZE 100clock_t start, stop;double duration;int MaxSubseqSum1(int a[], int N) { int ThisSum, MaxSum = 0; int i, j, k; for (i = 0; i < N; i++) { for (j = i; j <原创 2020-07-01 22:56:01 · 373 阅读 · 2 评论 -
!BST跟BST == NULL到底有什么区别?
if(!BST){}表示如果!BST=0将不执行大括号内程序也就是BST=0将执行大括号内程序也就是BST为空时执行大括号内程序if(BST == NULL){}表示如果BST==NULL将执行大括号内程序也就是BST为空时执行大括号内程序...原创 2021-01-25 13:46:08 · 237 阅读 · 0 评论 -
数据结构中的L=(List)malloc(sizeof(PtrToNode));是什么意思
sizeo函数(https://baike.baidu.com/item/sizeof/6349467#2)用于计算数据(包括数组、变量、类型、结构体等)所占用的内存空间,用字节数表示。在L=(List)malloc(sizeof(PtrToNode));中,sizeof是对定义的结构体PtrToNode取总字节数。malloc函数(https://baike.baidu.com/item/malloc%E5%87%BD%E6%95%B0/8582146?fromtitle=malloc&fro原创 2020-07-11 19:59:08 · 5097 阅读 · 0 评论 -
tyepdef struct LNode* List; ==> typedef struct a* b;这句话到底啥意思?
首先,int* p;这个语句可以理解为int*是一个新的数据类型。举一个相似的例子,一般指向整形的指针都是这样使用的: int p; //p是指向一个整型的指针。如果我们在前面使用了 typedef int Pint; 则上面的方法,可以改为:Pint p; 同样是声明一个指向整形的指针。这样typedef struct {…}* Pstr;就不难理解了,Pstr List;就是声明了一个指...原创 2020-04-30 22:39:07 · 724 阅读 · 2 评论
分享