Diferente pentru blog/lighs-out-shortlist intre reviziile #1 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

Give them a try in the comment section:
# You are given a 3x3 grid of light bulbs. Some lights are “on”, and some are “off”. Next to each light there is a button. Pressing that button results in toggling the state of both the current light and its four adjacent lights (left, right, up down). For a given configuration find the minimum number of button presses such that all the lights are “off”.
 
# You are given a grid of lights of size NxM (N, M <= 1000). Some lights are “on”, some are “off”. A move consists in choosing a rectangle of size PxQ and toggling the state of all the lights in that rectangle. Come up with an algorithm that finds the minimum number of moves that turn all the lights off.
 
Again, you are given a grid of NxM lights, that can be either “on” or “off”. One move consists in choosing a row or a column in this grid and toggling the states of all the lights in that row or column. Come up with an algorithm that finds the minimum number of moves to switch all the lights “off”.
 
Same problem as 1, but the grid size is 20x100.
 
 
You are given a tree of n <= 1000000 nodes and n - 1 edges. Each node of the tree contains a light bulb and a button. Pressing the button in a node switches the state of the light bulb and the adjacent light bulbs. Come up with an algorithm that finds out the minimum number of button presses to switch all the light bulbs “off”
 
 
You are given an undirected graph of n <= 100 nodes. Each node contains a light bulb and a button. Pressing the button in a node toggles the state of the light bulb and its adjacent light bulbs. Come up with an algorithm that finds out if there exists a solution that turns all the lights “off”.
 
 
Same setup as 6. Come up with an algorithm that finds out how many different solutions there are.
 
# Again, you are given a grid of NxM lights, that can be either “on” or “off”. One move consists in choosing a row or a column in this grid and toggling the states of all the lights in that row or column. Come up with an algorithm that finds the minimum number of moves to switch all the lights “off”.
# Same problem as 1, but the grid size is 20x100.
# You are given a tree of n <= 1000000 nodes and n - 1 edges. Each node of the tree contains a light bulb and a button. Pressing the button in a node switches the state of the light bulb and the adjacent light bulbs. Come up with an algorithm that finds out the minimum number of button presses to switch all the light bulbs “off”
# You are given an undirected graph of n <= 100 nodes. Each node contains a light bulb and a button. Pressing the button in a node toggles the state of the light bulb and its adjacent light bulbs. Come up with an algorithm that finds out if there exists a solution that turns all the lights “off”.
# Same setup as 6. Come up with an algorithm that finds out how many different solutions there are.
# You are given a grid of lights of size NxM (N, M <= 1000). Some lights are “on”, some are “off”. A move consists in choosing a cell and switch the state of the lights on the same row and column but leave the chosen cell alone. Come up with an algorithm that finds out the minimum number of moves to turn all the lights “off”.

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.