WA in Gift Rift

Here’s the problem link, kindly help me out. Any help would be appreciated. :slight_smile:

Here’s my submission:

There can be multiple values in a column with the same value which is maximum. Example: [1,1,1,1]. You have taken care of that in the minimum case. Do it for the maximum too.

Also, this might be a boomer way of doing things, but try to think of ways you can avoid the use of maps and other data structures unnecessarily. The implementation will be much easier and cleaner if you just use arrays here.