Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountAttackingBishopPairs ¶
func CountAttackingBishopPairs(bishops []BoardPosition) int
CountAttackingBishopPairs returns the count of the number of attacking pairs of Bishops. M is the dimension of the chessboard. M x M Runtime is O(N^2) where N is the number of bishops.
Types ¶
type BoardPosition ¶
type BoardPosition struct {
Row, Col int
}
BoardPosition represents a row and column on a square chessboard.
Click to show internal directories.
Click to hide internal directories.