New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Coding Question
AI Insights
Quick Summary
Iterate through all valid square submatrices of a specified size within a 2D array.
Calculate the sum of only the outer border elements for each submatrix.
Identify the maximum border sum, collect all unique values from frames that achieve it, and return their total.
What This Tests
2D Array traversal and coordinate indexing
Boundary extraction without double-counting corners
Dynamic state tracking for maximum values
Set operations for uniqueness filtering
Common Patterns
Sliding Window
Hashing
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
matrix =
frameSize =
Output
Expected