problem46-50

声明
该系列文章来自:http://aperiodic.net/phil/scala/s-99/
大部分内容和原文相同,加入了部分自己的代码。
如有侵权,请及时联系本人。本人将立即删除相关内容。

阅读全文

docker筑基篇-05-Dockerfile常用指令

上一篇中我们介绍了使用Dockerfile构建自己的镜像。其中使用了一个很少的几行指令就可以完成自己镜像的定制。
现在我们来看一下在Dockerfile中常用的其他指令。

1 CMD

CMD用于指定一个容器在启动的时候将要执行的指令。

阅读全文

P011 Container With Most Water

P011 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 at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.

阅读全文

P009-PalindromeNumber

P009 Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.

阅读全文

P008-StringtoInteger(atoi)

P008 String to Integer (atoi)

Implement atoi to convert a string to an integer.

阅读全文

P007-ReverseInteger

P007 Reverse Integer

Reverse digits of an integer.

阅读全文

P006-ZigZagConversion

P006 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)

阅读全文

P005-LongestPalindromicSubstring

P005 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.

阅读全文

P004-MedianofTwoSortedArrays

P004 Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively.

阅读全文

P003-LongestSubstringWithoutRepeatingCharacters

P003 Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.

阅读全文