自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

KatherineLeeyq的博客

李雅琪开始发奋了~

  • 博客(14)
  • 收藏
  • 关注

原创 【Leetcode】9.Palindrome Number 解题

【题目描述】: Determine whether an integer is a palindrome. Do this without extra space.[Some hints]: Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string

2016-04-19 16:35:25 428

转载 C++ int、string等常见类型转换

int、float、double与string互相转换

2016-04-19 16:30:43 1536

原创 【Leetcode】8.String to Integer (atoi) 解题

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible

2016-04-18 03:30:36 360

原创 【Leetcode】7.Reverse Integer 解题

Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding.

2016-04-18 02:49:32 454

原创 【Leetcode】6.ZigZag Conversion 解题

The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)

2016-04-18 02:04:00 322

原创 【Leetcode】5.Longest Palindromic Substring 解题

【题目描述】: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.【我的思路】: 从string前部

2016-04-18 00:49:27 273

原创 【LeetCode】4.Median of Two Sorted Arrays 解题

Median of Two Sorted ArraysThere are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).

2016-04-18 00:16:26 252

转载 C++ STL:set介绍

简介c++ stl集合(Set)是一种包含已排序对象的关联容器。set/multiset会根据待定的排序准则,自动将元素排序。两者不同在于前者不允许元素重复,而后者允许。1) 不能直接改变元素值,因为那样会打乱原本正确的顺序,要改变元素值必须先删除旧元素,则插入新元素2) 不提供直接存取元素的任何操作函数,只能通过迭代器进行间接存取,而且从迭代器角度来看,元素值是常数3) 元素比较动作只能用于型别相

2016-04-17 22:28:54 749 1

转载 C++ 静态数组([])和动态数组(new)的区别

C++中静态数组([])和动态数组(new)的区别

2016-04-16 02:02:42 10076 1

转载 C++ STL:vector介绍

介绍这篇文章的目的是为了介绍std::vector,如何恰当地使用它们的成员函数等操作。本文中还讨论了条件函数和函数指针在迭代算法中使用,如在remove_if()和for_each()中的使用。通过阅读这篇文章读者应该能够有效地使用vector容器,而且应该不会再去使用C类型的动态数组了。Vector总览vector是C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板

2016-04-16 01:32:53 467

转载 C++ string介绍

标准C++中string类

2016-04-16 01:20:46 327

原创 【Leetcode】3.Longest Substring Without Repeating Characters 解题

Given a string, find the length of the longest substring without repeating characters.Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “

2016-04-16 01:06:37 330

原创 【Leetcode】2.Add Two Numbers 解题

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it a

2016-04-15 23:45:43 304

原创 【Leetcode】1.Two Sum 解题

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution.

2016-04-15 23:36:21 282

空空如也

空空如也

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

TA关注的人

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