Home > Back-end >  Coding of cattle are to help do topic, SOB, nasty cry
Coding of cattle are to help do topic, SOB, nasty cry

Time:11-09

A two dimensional array, n * n contains some Numbers are negative, there is a sliding window, in what circumstance of sliding window and the maximum (width of sliding window is arbitrary)

CodePudding user response:

The window size from 1 x1 to NXN cycle for

CodePudding user response:

If there is no specific number, only said theory algorithm, who can do it, I have to worship,

CodePudding user response:

refer to the second floor the frog studio reply:
if there is no specific number, only said theory algorithm, who can do it, I have to head to


Filled with random Numbers to simulate,

CodePudding user response:

https://www.geeksforgeeks.org/maximum-sum-rectangle-in-a-2d-matrix-dp-27/

CodePudding user response:

Like is to use dynamic programming to solve

CodePudding user response:

The
reference 4 floor float in the sky - Jessie's reply:
https://www.geeksforgeeks.org/maximum-sum-rectangle-in-a-2d-matrix-dp-27/


He the algorithm time complexity is O (n ^ 3), is not very optimized, should be able to achieve O (n ^ 2)
  • Related