Skip to content

Latest commit

 

History

History
 
 

chessBoardCellColor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Check Out My YouTube Channel

Algorithm Challenge Available At CodeFights

Given two cells on the standard chess board, determine whether they have the same color or not.

Example

  • For cell1 = "A1" and cell2 = "C3", the output should be chessBoardCellColor(cell1, cell2) = true.

;

  • For cell1 = "A1" and cell2 = "H3", the output should be chessBoardCellColor(cell1, cell2) = false.

Hints

  • parseInt()

Input/Output

  • [time limit] 4000ms (js)
  • [input] string cell1
  • [input] string cell2
  • [output] boolean

true if both cells have the same color, false otherwise.