Skip to content

Instantly share code, notes, and snippets.

View anthonyhastings's full-sized avatar

Anthony Hastings anthonyhastings

View GitHub Profile
// Write a function, that checks whether the bomb explodes if the wires are cut in a given order.
//
// It should take an array of strings (colors of wires) as input and return a single boolean value
// as output (true if bomb explodes, false otherwise).
//
// Example of an input:
// ['red', 'green', 'blue', 'yellow', 'white', 'black']
//
// Rules
// - After cutting the red wire, you can't cut the yellow one next.