自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 罗马数字转换成阿拉伯数字

罗马数字采用七个罗马字母作数字、即Ⅰ(1)、V(5)、X(10)、L(50)、C(100)、D(500)、M(1000)。记数的方法:1、相同的数字连写,所表示的数等于这些数字相加得到的数,如 Ⅲ=3;2、小的数字在大的数字的右边,所表示的数等于这些数字相加得到的数,如 Ⅷ=8、Ⅻ=12;3、小的数字(限于 Ⅰ、X 和 C)在大的数字的左边,所表示的数等于大数减小数得到的数,如

2015-10-28 22:51:23 936

原创 [leetcode 252] Meeting Rooms

Problem Description:Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si For example,Given [[0, 30],[5, 10],[15, 20]],return false. 

2015-10-27 23:07:07 1253

转载 C++ STL 排序(Sort)

9

2015-10-24 11:52:20 1022

原创 vector.erase()用法介绍及注意事项;

vector::erase():从指定容器删除指定位置的元素或某段范围内的元素vector::erase()方法有两种重载形式如下:iterator erase(   iterator _Where);删除指定位置的元素,返回值是一个迭代器,指向删除元素的下一个元素;iterator erase(   iterator _First,   ite

2015-10-24 09:23:33 23827 4

原创 [leetcode243] Shortest Word Distance

Problem Description:Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list.For example,Assume that words = ["practice", "ma

2015-10-22 21:53:42 720

转载 标准C++中的string类的用法总结

要想使用标准C++中string类,必须要包含#include // 注意是,不是,带.h的是C语言中的头文件using  std::string;using  std::wstring;或using namespace std;下面你就可以使用string/wstring了,它们两分别对应着char和wchar_t。

2015-10-22 21:14:39 896

原创 [leetcode 293] Flip Game

Problem Description:You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take turns to flip two consecut

2015-10-22 21:11:58 781

原创 [LeetCode 266]Palindrome Permutation

回文序列(回文结构)        如果一个序列的逆序列与原序列相同,则这个序列为回文序列或有回文结构。比如“1235321”。如何判断回文结构:最多只有一个字符的个数为奇数个,其余均为偶数个。leetcode上有个相关题目:Problem Description:Given a string, determine if a permutation

2015-10-20 21:58:54 1021

空空如也

空空如也

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

TA关注的人

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