
力扣刷刷刷
花事了哎
这个作者很懒,什么都没留下…
展开
-
杂草丛生的C
scanf中。格式化输入字符串时候%s遇到空白符就会停止,类似的空白符有空格、制表符、换行符。最后这些还会滞留在缓冲区。printf中,%s输出字符串是直到字符串结束符’\0’才停止。原创 2021-03-28 01:12:47 · 109 阅读 · 0 评论 -
力扣刷题记录 - 203 移除链表元素
C:/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */struct ListNode* removeElements(struct ListNode* head, int val){ struct ListNode *p; if(head == NULL) // 对开始结点进.原创 2021-02-06 17:46:35 · 124 阅读 · 0 评论 -
力扣刷题记录 -1、 两数之和
我的解法:C:/**Note: The returned array must be malloced, assume caller calls free().首先搞清楚函数中的形参的意思:int* nums表示传进去一个数组的地址;int numsSize表示传进去的数组大小;int target表示数组中两数相加需要等于的值;int* returnSize表示返回的数组的大小。/int twoSum(int* nums, int numsSize, int target, int.原创 2021-02-06 17:40:37 · 96 阅读 · 0 评论