 ### 本系列介绍

本系列是本人在准备秋招过程中开始刷题leetcode的一个自我约束的手段，每周进行更新，这周是第一周，尝试一下，后面会更系统的进行分类和创作。

### Jewels and Stones（771）easy

Q : You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.

### Array Partition I（561）easy

Q : Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible.

``````Example 1:
Input: [1,4,3,2]
Output: 4
Explanation: n is 2, and the maximum sum of pairs is 4 = min(1, 2) + min(3, 4).
``````

### Reshape the Matrix（566）easy

Q : In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.

You’re given a matrix represented by a two-dimensional array, and two positive integers r and c representing the row number and column number of the wanted reshaped matrix, respectively.

The reshaped matrix need to be filled with all the elements of the original matrix in the same row-traversing order as they were.

If the ‘reshape’ operation with given parameters is possible and legal, output the new reshaped matrix; Otherwise, output the original matrix.

### Toeplitz Matrix（766）easy

A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.

Now given an M x N matrix, return True if and only if the matrix is Toeplitz.

### 本周小结

本周是开始做leetcode的第一周，还有很多东西需要系统化的完善起来，做了几道easy的题目，代码也只上传了一部分到github，后面都会继续完善！一起加油！
github地址：https://github.com/HarryinGit3/myleetcode

0%