自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 LeetCode刷题笔记----P16 three sum closest

LeetCode刷题笔记----P16 three sum closest0.问题描述Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactl

2020-11-05 10:00:07 127

原创 LeetCode刷题笔记----P15 three sum

LeetCode刷题笔记----P11 Container with most water0.问题描述Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Notice that the solution set must not con

2020-11-04 15:19:11 104

原创 LeetCode刷题笔记----P11 Container with most water

LeetCode刷题笔记----P11 Container with most water0.问题描述Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two

2020-11-03 10:25:41 711

原创 LeetCode刷题笔记----P4两个正序数组的中位数

LeetCode刷题笔记----P4两个正序数组的中位数0.问题描述Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.Follow up: The overall run time complexity should be O(log (m+n)).1.归并排序首先想到归并排序合并两数组,再求取中位数,时间复杂度O(m+n)

2020-10-21 20:33:44 120

原创 LeetCode刷题笔记----P2两数相加

LeetCode刷题笔记----P2两数相加0.问题描述You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.

2020-10-19 10:34:46 133

原创 LeetCode刷题笔记----P1两数之和

LeetCode刷题笔记----P1两数之和0.Vector用法vector<int> a;a.push_back(3);a.size();a.capacity();1.暴力 vector<int> result; int i,j; for(i=0;i<nums.size();i++) { for(j=i+1;j<nums.size();j++){

2020-10-16 16:52:37 158

原创 LeetCode刷题笔记

LeetCode刷题笔记刷题目录添加链接描述

2020-10-16 11:03:33 100

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除