/* * @lc app=leetcode.cn id=88 lang=c * * [88] 合并两个有序数组 * * https://leetcode-cn.com/problems/merge-sorted-array/description/ * * algorithms * Easy (43.05%) * Total Accepted: 31.4K * Total Submissions: 73K * Testcase Example: '[1,2,3,0,0,0]\n3\n[2,5,6…
/* * @lc app=leetcode.cn id=21 lang=c * * [21] 合并两个有序链表 * * https://leetcode-cn.com/problems/merge-two-sorted-lists/description/ * * algorithms * Easy (52.72%) * Total Accepted: 47.1K * Total Submissions: 89K * Testcase Example: '[1,2,4]\n[1,3,4]' *…
/* * @lc app=leetcode.cn id=13 lang=c * * [13] 罗马数字转整数 * * https://leetcode-cn.com/problems/roman-to-integer/description/ * * algorithms * Easy (56.94%) * Total Accepted: 42.3K * Total Submissions: 74.3K * Testcase Example: '"III"' * * 罗马数字包含以下七…
/* * @lc app=leetcode.cn id=371 lang=c * * [371] 两整数之和 * * https://leetcode-cn.com/problems/sum-of-two-integers/description/ * * algorithms * Easy (55.04%) * Total Accepted: 8.1K * Total Submissions: 14.8K * Testcase Example: '1\n2' * * 不使用运算符 + 和 - …
开学后忙的焦头烂额(懒得很),正式开始刷leecode的题目了. 想了想c语言是最最基础的语言,虽然有很多其他语言很简单,有更多的函数可以用,但c语言能煅炼下自己的思考能力.python则是最流行的语言. 做题用的是 xcode的 leecode插件 非常的方便.顺序从简单到难.开始. [1] 两数之和 * * https://leetcode-cn.com/problems/two-sum/description/ * * algorithms * Easy (44.20%) * Total…
/* * @lc app=leetcode.cn id=349 lang=c * * [349] 两个数组的交集 * * https://leetcode-cn.com/problems/intersection-of-two-arrays/description/ * * algorithms * Easy (60.49%) * Total Accepted: 15.1K * Total Submissions: 25K * Testcase Example: '[1,2,2,1]\n[2,2…
/* * @lc app=leetcode.cn id=118 lang=c * * [118] 杨辉三角 * * https://leetcode-cn.com/problems/pascals-triangle/description/ * * algorithms * Easy (60.22%) * Total Accepted: 17.6K * Total Submissions: 29.2K * Testcase Example: '5' * * 给定一个非负整数 numRows,生成…
/* * @lc app=leetcode.cn id=387 lang=c * * [387] 字符串中的第一个唯一字符 * * https://leetcode-cn.com/problems/first-unique-character-in-a-string/description/ * * algorithms * Easy (36.55%) * Total Accepted: 23.7K * Total Submissions: 64.7K * Testcase Example: '…
/* * @lc app=leetcode.cn id=28 lang=c * * [28] 实现strStr() * * https://leetcode-cn.com/problems/implement-strstr/description/ * * algorithms * Easy (37.86%) * Total Accepted: 38.6K * Total Submissions: 102K * Testcase Example: '"hello"\n"ll&…
/* * @lc app=leetcode.cn id=7 lang=c * * [7] 整数反转 * * https://leetcode-cn.com/problems/reverse-integer/description/ * * algorithms * Easy (31.36%) * Total Accepted: 77.7K * Total Submissions: 247.8K * Testcase Example: '123' * * 给出一个 32 位的有符号整数,你需要将这…