GRASP原则六: 多态 Polymorphism How to handle alternative behaviors based on type 如何处理依据类型不同而有 不同行为的一类需求 ? 比如,开餐馆 苏州人喜欢甜.四川人喜欢麻.湖南人喜欢辣,咋处理 ?1.1 9条GRASP原则 Information Expert responsibilities should be assigned to objects that contain relevant info…
18.12 Given an NxN matrix of positive and negative integers, write code to find the submatrix with the largest possible sum. 这道求和最大的子矩阵,跟LeetCode上的Maximum Size Subarray Sum Equals k和Maximum Subarray很类似.这道题不建议使用brute force的方法,因为实在是不高效,我们需要借鉴上面LeetCode…