学会思考
刻意练习
摘要: 参考:https://www.cnblogs.com/grandyang/p/10961560.html#include <vector> #include <stdlib.h> #include <ostream> #include <string> using namespace std; /* 阅读全文
posted @ 2020-03-12 17:17 Worty 阅读(156) 评论(0) 推荐(0) 编辑
摘要: /** * references: * https://www.cnblogs.com/grandyang/p/7565424.html * @brief The Solution class * Given an array with n integers, your task is to che 阅读全文
posted @ 2020-03-12 16:29 Worty 阅读(233) 评论(0) 推荐(0) 编辑
摘要: /** * references: * https://www.cnblogs.com/grandyang/p/7608976.html * @brief The Solution class * Given an unsorted array of integers, find the lengt 阅读全文
posted @ 2020-03-12 15:22 Worty 阅读(156) 评论(0) 推荐(0) 编辑
摘要: /** * @brief The Solution class * Given a matrix A, return the transpose of A. The transpose of a matrix is the matrix flipped over it's main diagonal 阅读全文
posted @ 2020-03-12 14:45 Worty 阅读(389) 评论(0) 推荐(0) 编辑
摘要: /**参考: https://www.cnblogs.com/grandyang/p/7084957.html * @brief The Solution class * Given an integer array, find three numbers whose product is maxi 阅读全文
posted @ 2020-03-12 14:15 Worty 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2020-03-12 11:39 Worty 阅读(169) 评论(0) 推荐(0) 编辑
摘要: //solution1 /** //references:https://www.cnblogs.com/grandyang/p/6209746.html */ class Solution1{ public: vector<int> findDuplicates(vector<int>& nums 阅读全文
posted @ 2020-03-12 11:22 Worty 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Find All Numbers Disappeared in an Array 题目描述 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others 阅读全文
posted @ 2020-03-12 10:11 Worty 阅读(124) 评论(0) 推荐(0) 编辑