leetcode简单题题型分类

leetcode刷题

- tag: 栈、排序、位运算、递归、队列、数组、哈希表、链表、数学、双指针、字符串
* 栈&队列:https://leetcode-cn.com/problems/implement-queue-using-stacks-lcci/
工作级:
二叉查找树、平衡树、分治(二分查找、归并排序)、搜索算法(深搜、广搜)

* 排序:

* 递归:

* 数组:https://leetcode-cn.com/problems/running-sum-of-1d-array/solution/

runtime error: load of null pointer of type ‘int’

输出数组的大小,如果题目中说明是返回一个动态空间,需要申请空间并初始化

int output = 0;
output = malloc(numSizesizeof(int)); //对于字符串则需要+1 考虑结束符,for循环中边界条件也要考虑
memset(output, 0, numSize*sizeof(int));

memset_s(datas, sizeof(HsecDefendAdjustCar) * tableCount, 0, sizeof(HsecDefendAdjustCar) * tableCount);
使用memset_s(目的内存,目的内存最大值)

也可以使用一个很大的值output[1000]

* 单链表:

* 反转链表:https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof/solution/c-shi-jian-fu-za-du-on-kong-jian-fu-za-du-o1-by-bi/

* 双指针:https://leetcode-cn.com/problems/long-pressed-name/

* 快慢指针

https://leetcode-cn.com/problems/lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof/

输出倒数第k个结点为头结点的链表

* 字符串:https://leetcode-cn.com/problems/shuffle-string/solution/

https://leetcode-cn.com/problems/defanging-an-ip-address/submissions/

* 哈希表:https://leetcode-cn.com/problems/shu-zu-zhong-zhong-fu-de-shu-zi-lcof/solution/c-hash-jian-dan-tong-guan-by-13011110405/

有时候hash表写成数组,因为数组也是一种哈希表

# VSCODE配置debug环境
https://www.jianshu.com/p/b7cc0e36cd5f
在本机上mingw在c盘中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值