/* * @lc app=leetcode.cn id=203 lang=c * * [203] 移除链表元素 * * https://leetcode-cn.com/problems/remove-linked-list-elements/description/ * * algorithms * Easy (39.58%) * Total Accepted: 18.3K * Total Submissions: 46.2K * Testcase Example: '[1,2,6,3,4,5,…
/* * @lc app=leetcode.cn id=217 lang=c * * [217] 存在重复元素 * * https://leetcode-cn.com/problems/contains-duplicate/description/ * * algorithms * Easy (47.25%) * Total Accepted: 46K * Total Submissions: 97.2K * Testcase Example: '[1,2,3,1]' * * 给定一个整数数组,…
/* * @lc app=leetcode.cn id=83 lang=c * * [83] 删除排序链表中的重复元素 * * https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/description/ * * algorithms * Easy (44.24%) * Total Accepted: 18.4K * Total Submissions: 41.5K * Testcase Example: '[1…
/* * @lc app=leetcode.cn id=35 lang=c * * [35] 搜索插入位置 * * https://leetcode-cn.com/problems/search-insert-position/description/ * * algorithms * Easy (42.89%) * Total Accepted: 31.6K * Total Submissions: 73.6K * Testcase Example: '[1,3,5,6]\n5' * * 给定…
开学后忙的焦头烂额(懒得很),正式开始刷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…