作业
文章平均质量分 58
楚春秋
一颗灵丹吞入腹,始知我命不由天
展开
-
算法第八次作业
题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999. 解析: 这道题第一点告诉我们的是:一定要学好英语~!roman numeral是罗马数字的意思。 第二点就是要见多识广,比如了解罗马数字构成(比如会百度百科) 题目本身不难,原创 2017-11-03 23:21:55 · 219 阅读 · 0 评论 -
算法第六次作业
这里首先写一个我遇到到的一个问题while(i<n&&str[i]>='0'&&str[i]<='9') { if(base>INT_MAX/10||(base==INT_MAX/10&&str[i]-'0'>7)) {return (sign==1)?INT_MAX:INT_MIN;} base=10*base+(str[原创 2017-10-15 12:16:57 · 283 阅读 · 0 评论 -
算法第七次作业
题目: 11. Container With Most Water 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 line i is原创 2017-10-22 10:29:52 · 244 阅读 · 0 评论 -
算法第四次作业
Longest Palindromic Substring Description: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example: Input: “babad”Output: “bab”No原创 2017-10-01 15:41:17 · 344 阅读 · 0 评论 -
算法第五次作业
国庆浪了一周,到最后一天才开始补作业。不得不说,做咸鱼就是爽啊! 题目: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 f原创 2017-10-08 11:53:16 · 243 阅读 · 0 评论 -
算法第二次作业
题目:Reverse Integer 描述: Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321click to show spoilers. Have you thought about this? Here are some good questions原创 2017-09-16 15:27:59 · 232 阅读 · 0 评论 -
算法第三次作业
问题: Given a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is “b”, with t原创 2017-09-24 11:03:31 · 327 阅读 · 0 评论 -
算法分析与设计第一次作业
题目:Add Two Numbers 描述: 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 contain a single digit. Add the原创 2017-09-07 11:35:43 · 308 阅读 · 0 评论 -
java的发展历史简介
Java:由Sun Microsystems公司于1995年5月推出的Java程序设计语言和Java平台的总称。Java语言是一种可以撰写跨平台应用软件的面向对象的程序设计语言,由当时任职太阳微系统的詹姆斯·高斯林(James Gosling)等人于1990年代初开发,它最初被命名为Oak。Java伴随着互联网的迅猛发展而发展,逐渐成为重要的网络编程语言。 Java是一门面向对象编程语言,不仅吸收原创 2017-12-10 13:31:01 · 3409 阅读 · 0 评论