We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💬 문제
https://school.programmers.co.kr/learn/courses/30/lessons/12905
💬 Idea
최소값 +1
💬 풀이
import Foundation func solution(_ board:[[Int]]) -> Int { var sqareCheckBoard = board var maxWidth = 0 for i in 1..<board.count { for j in 1..<board[0].count { if board[i][j] == 1 { sqareCheckBoard[i][j] = min(sqareCheckBoard[i-1][j-1], sqareCheckBoard[i-1][j], sqareCheckBoard[i][j-1]) + 1 if maxWidth < sqareCheckBoard[i][j] { maxWidth = sqareCheckBoard[i][j] } } } } if board.count == 1 || board[0].count == 1 { for i in 0..<board.count { for j in 0..<board[0].count { if maxWidth < sqareCheckBoard[i][j] { maxWidth = sqareCheckBoard[i][j] } } } } return maxWidth * maxWidth }
The text was updated successfully, but these errors were encountered:
#184 - 가장 큰 정사각형 찾기 문제 풀이
2c91efb
hwangJi-dev
No branches or pull requests
💬 문제
https://school.programmers.co.kr/learn/courses/30/lessons/12905
💬 Idea
최소값 +1
이 현재 길이가된다”는 원리를 이용해서 풀어주었다.💬 풀이
The text was updated successfully, but these errors were encountered: