leetcode554】的更多相关文章

There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. You want to draw a vertical line from the top to the bottom and cross the leastbricks. The brick wall…
public class Solution { public int LeastBricks(IList<IList<int>> wall) { ) { ; } ; Dictionary<int, int> map = new Dictionary<int, int>(); foreach (var list in wall) { ; ; i < list.Count - ; i++) { length += list[i]; if (!map.Con…