题目
Given a string containing just the characters
'('
and')'
, find the length of the longest valid (well-formed) parentheses substring.
Example1
1 | Input: "(()" |
Example2
1 | Input: ")()())" |
Given a string containing just the characters
'('
and')'
, find the length of the longest valid (well-formed) parentheses substring.
Example1
1 | Input: "(()" |
Example2
1 | Input: ")()())" |
在前一篇博客中我们学习了如何配置Centos私有云,下一步我们将要学习Go语言编程。
什么是Go语言?
Go语言由Google于2009年发布,它是一种静态强类型、编译型、并发型、解释型的编程语言,并且具有便利的垃圾回收和强大的运行时反射。
Go语言是简洁的和有效率的,实用性很强。
要学习Go语言编程,第一步就是要学习配置需要的相关环境。
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.
Example:
1 | Input: [0,1,0,2,1,0,1,3,2,1,2,1] |