摘要: Q: A: 1.暴力找所有可能的子数组,n^2个子数组,最长长度n,则n ^3。 2.n^2解法 从1~n-1各起点开始,一直找到结尾,n^2 class Solution { public: int subarraySum(vector<int>& nums, int k) { int res=0 阅读全文
posted @ 2019-11-12 14:05 NeoZy 阅读(114) 评论(0) 推荐(0)