自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 LeetCode练习 两个排序数组的中位数

题目是已知两个排序数组,求它们的中位数,时间复杂度要求是O(log(m+n))。想了想,还是排序适合我。#include "stdafx.h"#include "cctype"#include "iostream"#include<math.h>#include <ctime>#include "afxtempl.h"#include "singleLink.h&

2018-02-26 14:45:19 172

原创 LeetCode练习 最长非重复子字符串

题目是说给定一个字符串,找其中非重复子字符串的最大长度.      我随机产生了0-9,大写字母,小写字母的ASCII码值组成一个长度60的字符串(保证有重复字符出现),然后是用char数组来实现的.string和char数组之间很容易转换.#define  random(a,b) (rand()%(b-a+1)+a)#define MAX_NUM    60  //定义字符串长度int _tma...

2018-02-12 14:59:42 229

原创 leetcode练习 add two numbers

原题  You are given two linked listsrepresenting two non-negative numbers. The digits are stored in reverse orderand each of their nodes contain a single digit. Add the two numbers and returnit as a lin...

2018-02-08 13:20:48 146

原创 leetcode 算法练习 two-sum

题目如下:     Given an array of integers, find two numbers such that they add up to a specific target number.   The function twoSum should return indices of the two numbers such that they add up to th

2018-02-05 12:29:43 146

空空如也

空空如也

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

TA关注的人

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