Find the number of sub arrays (continuous) which have sum = K (Taking into account time complexity)

前端 未结 0 1181
猫巷女王i
猫巷女王i 2021-02-05 10:10

I am trying to find the number of sub arrays which equals to a given sum K. For example, when I have an arr = [1, -1, 1, -1, 1], I created a new array such that:

         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题