如果你的工作本身就是一种有趣、充实的经历,那么你从工作中赚到的任何钱都只是一个副产品——就像柴火后留下的一堆灰烬。当你点燃火时,产生灰烬不是你的目标;你喜欢火的温暖和闪烁的光芒,你也碰巧从这个过程中得到了一些灰烬。
If your job itself is a fun,fulfilling experiences then any money you earn from doing the work is just a by-product——like the pile of ash left after a wood fire.When you lit the fire, creating ash wasn't your goal; you enjoyed the fire's warmth and flickering light ,and you just happened to get some ash from the process ,too
If your job itself is a fun,fulfilling experiences then any money you earn from doing the work is just a by-product——like the pile of ash left after a wood fire.When you lit the fire, creating ash wasn't your goal; you enjoyed the fire's warmth and flickering light ,and you just happened to get some ash from the process ,too
Alexander Grothendieck 1966年获得菲尔兹奖,1988年赢得克拉福德奖,却被他拒绝了。他贡献给数学的概念很多,比如topological tensor products (拓扑张量积), nuclear spaces(核空间), sheaf cohomology as derived functors(作为导函子的层上同调), schemes(概型), K-theory(K-理论) and Grothendieck-Riemann-Roch定理。
In August 1991 he left home suddenly, without informing anyone, for an unknown location. There he spent his time writing an extremely large work on physics as well as philosophical meditations on themes such as free choice, determinism and the existence of evil. He refused practically every human contact.
1991年8月,他突然离开了家,杳无音信,去了一个无人知晓的地方。他把时间用来写一部物理学巨著,以及用来进行哲学沉思关于自由选择,确定性和恶的存在性。他拒绝任何人的实际接触。
In August 1991 he left home suddenly, without informing anyone, for an unknown location. There he spent his time writing an extremely large work on physics as well as philosophical meditations on themes such as free choice, determinism and the existence of evil. He refused practically every human contact.
1991年8月,他突然离开了家,杳无音信,去了一个无人知晓的地方。他把时间用来写一部物理学巨著,以及用来进行哲学沉思关于自由选择,确定性和恶的存在性。他拒绝任何人的实际接触。
力扣第11题
给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。
找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
返回容器可以储存的最大水量。
说明:你不能倾斜容器。
示例如图
代码如图
逻辑:
代码是一个经典的二分查找问题解决方案,用于计算给定数组中两个元素之间可以形成的最大的水槽(或矩形)面积。
在这段代码中,left 和 right 指针分别从数组的两端开始,向中间移动。每次迭代中,计算当前左右指针所界定的区间能够形成的水槽的最大面积,即以 Math.min(height[left], height[right]) 作为水槽的高度,以 right - left + 1 作为水槽的宽度。
然后,根据 height[left] 和 height[right] 的较小值来决定移动哪个指针。如果 height[left] 小于 height[right],则移动 left 指针向右;否则,移动 right 指针向左。这是因为移动较高的一侧不会增加当前区间的水槽面积,而移动较低的一侧可以增加宽度,从而可能形成更大的面积。
代码中的 while 循环条件是 left < right,这意味着当两个指针相遇时,循环将结束。这是一个安全的退出条件,因为当 left 和 right 相等时,它们指向的元素高度将决定整个数组的最大水槽面积,此时宽度为 0,面积也将是 0。
注意点:无
给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。
找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
返回容器可以储存的最大水量。
说明:你不能倾斜容器。
示例如图
代码如图
逻辑:
代码是一个经典的二分查找问题解决方案,用于计算给定数组中两个元素之间可以形成的最大的水槽(或矩形)面积。
在这段代码中,left 和 right 指针分别从数组的两端开始,向中间移动。每次迭代中,计算当前左右指针所界定的区间能够形成的水槽的最大面积,即以 Math.min(height[left], height[right]) 作为水槽的高度,以 right - left + 1 作为水槽的宽度。
然后,根据 height[left] 和 height[right] 的较小值来决定移动哪个指针。如果 height[left] 小于 height[right],则移动 left 指针向右;否则,移动 right 指针向左。这是因为移动较高的一侧不会增加当前区间的水槽面积,而移动较低的一侧可以增加宽度,从而可能形成更大的面积。
代码中的 while 循环条件是 left < right,这意味着当两个指针相遇时,循环将结束。这是一个安全的退出条件,因为当 left 和 right 相等时,它们指向的元素高度将决定整个数组的最大水槽面积,此时宽度为 0,面积也将是 0。
注意点:无
✋热门推荐