摘要: 1.题目描述 Given an integer, convert it to a roman numeral. 十进制数字转为罗马数字 2.题目分析 罗马数字计数方法 I V X L C D M 1 5 10 50 100 500 1000 相同的数字连写、所表示的数等于这些数字相加得到的数、如:Ⅲ 阅读全文
posted @ 2018-02-25 21:30 vlice 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 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 tw 阅读全文
posted @ 2018-02-24 21:01 vlice 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 自己编写一个函数使字符串型的字符转为整形数字 2.题目分析 去除开头空格,判断开头的“+”“-”号就可以了。 3.解题思路 阅读全文
posted @ 2018-02-24 19:55 vlice 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 做的这两道题,到现在还没通过,只好先放一下了。-_-|| 5题代码: 15题代码: 阅读全文
posted @ 2018-02-24 09:37 vlice 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the 阅读全文
posted @ 2018-02-24 09:35 vlice 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 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 fixe 阅读全文
posted @ 2018-02-23 23:32 vlice 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given a string, find the length of the longest substring without repeating characters. 返回给定字符串中的最长不重复字符串的长度 2.题目分析 起初看见这个题,直接双指针遍历了,结果老是wrong a 阅读全文
posted @ 2018-02-22 20:43 vlice 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 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 阅读全文
posted @ 2018-02-22 20:34 vlice 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 给一个数n,在线性时间内得出末尾0 阅读全文
posted @ 2018-02-14 20:40 vlice 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 1.题目描述 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For exam 阅读全文
posted @ 2018-02-14 20:26 vlice 阅读(81) 评论(0) 推荐(0) 编辑