传送门Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -...
还是从一道相对简单的问题入手:LeetCode11 - Container With Most Water问题概要:给一个数组,代表一系列墙壁的高度。要求选出两个墙壁,使它们能够储存最多的水。并且:忽略墙壁的厚度忽略选定的墙壁之间的墙壁暴力解法可以轻松想出一个暴力解法:遍历所有墙壁的组合,找出容积最大的一个。class Solution {
fun maxArea(height: Int...