1.block的声明和注意事项 #import "ZYViewController.h" @interface ZYViewController () @end /*用typedef可以声明一种类型的block*/ //block前加上typedef, 那么就不是一个block指针(变量),而是一种block类型 //给int (^) (int a, int b) 这种block类型 声明了一个别名,叫做Block5 typedef int (^Block5) (int a, int…
Pour Water: We are given an elevation map, heights[i] representing the height of the terrain at that index. The width at each index is 1. After V units of water fall at index K, how much water is at each index? Water first drops at index K and rests…