/* * @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=26 lang=c * * [26] 删除排序数组中的重复项 * * https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/description/ * * algorithms * Easy (42.77%) * Total Accepted: 89.1K * Total Submissions: 208.1K * Testcase Example: '[…
/* * @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' * * 给定…
/* * @lc app=leetcode.cn id=27 lang=c * * [27] 移除元素 * * https://leetcode-cn.com/problems/remove-element/description/ * * algorithms * Easy (53.46%) * Total Accepted: 39.5K * Total Submissions: 73.7K * Testcase Example: '[3,2,2,3]\n3' * * 给定一个数组 nums …
开学后忙的焦头烂额(懒得很),正式开始刷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=344 lang=c * * [344] 反转字符串 * * https://leetcode-cn.com/problems/reverse-string/description/ * * algorithms * Easy (65.20%) * Total Accepted: 39.8K * Total Submissions: 61.1K * Testcase Example: '["h","e",&qu…
/* * @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=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=169 lang=c * * [169] 求众数 * * https://leetcode-cn.com/problems/majority-element/description/ * * algorithms * Easy (58.05%) * Total Accepted: 27.2K * Total Submissions: 46.7K * Testcase Example: '[3,2,3]' * * 给定一个大小为 n 的数组,…
/* * @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…