Code a function in python row_conflict(board,r): Given a board and an integer r
ID: 3681702 • Letter: C
Question
Code a function in python row_conflict(board,r): Given a board and an integer r indicating a row index, check and return True if a queen is already placed in row r; return False otherwise.
Assume: board is a list of lists of Booleans; board is square; r is an integer.
Hint: Remember, the board is zero-indexed, and negative indexes are not to be used.
Examples:
row_conflict([[True,False],[False,False]],0) True
row_conflict([[True,False],[False,False]],1) False
row_conflict([[True,False],[False,False]],-2) False # negatives not allowed
row_conflict([[True,False],[False,False]],5) False # index out of bound