最新 最热

leetcode-665-Non-decreasing Array

题目描述:Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasi...

2018-05-22
0

leetcode-674-Longest Continuous Increasing Subsequence

题目描述:Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray).Example 1:Input: [1,3,5,4,7]Output: 3Expl...

2018-05-22
0

leetcode-566-Reshape the Matrix

题目描述: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...

2018-05-22
0

leetcode-35- Search Insert Position

题目描述:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order....

2018-05-21
0

leetcode-747-Largest Number At Least Twice of Others(求vector的最大值和次大值)

题目描述:In a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice as much as eve...

2018-05-21
0

leetcode-812-Largest Triangle Area

题目描述:You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points.Example:Input: points = [[0,0]...

2018-05-21
1

leetcode-832-Flipping an Image

题目描述:Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.To flip an image horizontally means that ...

2018-05-21
1

C++构造无向图&求最短路径源码

用vector<edge> es[MAX]表示点,每个点队列里放着点的相邻边和到边的距离。以下源码经过测试可运行#include <iostream>#include <cstdio>#include <queue>using namespace std;#define MAX 10000 //MAX表示......

2018-04-26
1

哎呦不错哦!一组让人眼前一亮的404创意页面设计

原文出处: graphicdesignjunction 译文出处:优设网 WEARESPRY – 404 Error PageCayenne – 404 Error Pagekwarte

2018-03-07
1

map对象建立家族姓氏查询

题目:定义一个map对象,其元素的键是家族姓氏,而值是存储该家族孩子名字的vector对象。为这个map容器输入至少六个条目。通过基于家族姓氏的查询检测你的程序,查询应输出该家族所有孩子的名字。 1 //定义一个map对象,其元素...

2018-01-17
0