Easiest Solution using Math
IntuitionApproachComplexity

Time complexity:



Space complexity:

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
![image.png](https://assets.leetcode.com/users/images/12d6e0ae-b29b-423e-976f-d972081014b0_1743195228.6891682.png)


- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int maxContainers(int n, int w, int maxWeight) {
        return Math.min(n*n,maxWeight/w);
    }
}
```
['Math', 'Java']