/* * @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=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…
难度等级:简单 题目描述: 将两个有序链表合并为一个新的有序链表并返回.新链表是通过拼接给定的两个链表的所有节点组成的. 示例: 输入:1->2->4, 1->3->4输出:1->1->2->3->4->4 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/merge-two-sorted-lists著作权归领扣网络所有.商业转载请联系官方授权,非商业转载请注明出处. 解题思路: 1.此题主要考察对链…
开学后忙的焦头烂额(懒得很),正式开始刷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=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 位的有符号整数,你需要将这…
/* * @lc app=leetcode.cn id=434 lang=c * * [434] 字符串中的单词数 * * https://leetcode-cn.com/problems/number-of-segments-in-a-string/description/ * * algorithms * Easy (29.13%) * Total Accepted: 4.2K * Total Submissions: 14.2K * Testcase Example: '"Hello, m…
/* * @lc app=leetcode.cn id=326 lang=c * * [326] 3的幂 * * https://leetcode-cn.com/problems/power-of-three/description/ * * algorithms * Easy (42.85%) * Total Accepted: 14.2K * Total Submissions: 33.1K * Testcase Example: '27' * * 给定一个整数,写一个函数来判断它是否是 3…
/* * @lc app=leetcode.cn id=263 lang=c * * [263] 丑数 * * https://leetcode-cn.com/problems/ugly-number/description/ * * algorithms * Easy (44.82%) * Total Accepted: 7K * Total Submissions: 15.7K * Testcase Example: '6' * * 编写一个程序判断给定的数是否为丑数. * * 丑数就是只包…