ARTS
波澜不惊 云的心声
wx:15957100574
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ARTS学习打卡--第五周
Leetcode: 1160. Find Words That Can Be Formed by Characters You are given an array of strings words and a string chars. A string is good if it can be formed by characters from chars (each charac...原创 2019-10-13 11:27:02 · 615 阅读 · 0 评论 -
ARTS学习打卡--第一周
Algorithm: Leetcode Flipping an Image 题目原意:对一个二维数组,首先对每行的元素进行顺序反转,然后对每个元素取相反元素。 思路: 简单题,利用两个for循环,内层循环将每行的元素从后往前访问,将每个元素与1进行异或操作后,存放到一个新的向量中,最后返回这个新向量。 代码: class Solution { public: ...原创 2019-09-01 21:15:39 · 352 阅读 · 0 评论 -
ARTS学习打卡--第二周
又到了ARTS打卡时间。 Algorithm Sort Array By Parity 题目原意:将原始的向量元素,按照偶数在前,奇数在后的顺序进行存放。 思路: 简单题,利用两次for循环,第一次将奇数放入向量,第二次将偶数放入向量即可。 代码: class Solution { public: vector<int> sortArrayByP...原创 2019-09-08 21:32:00 · 249 阅读 · 0 评论 -
ARTS学习打卡--第三周
本周是ARTS打卡第三周,按照惯例,依然以ARTS的方式进行。 Leetcode: 977. Squares of a Sorted Array 题目原意:对一个数组按照平方后的数值进行从小到大的排序。 思路:先对所有元素进行平方操作,然后调用sort函数进行排序即可 代码: class Solution { public: vector<int> sorted...原创 2019-09-15 18:04:27 · 395 阅读 · 0 评论 -
ARTS学习打卡--第四周
Leetcode: 1051. Height Checker 原题:Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of students not standing in the right positions. (Th...原创 2019-09-25 19:36:36 · 293 阅读 · 0 评论
分享