given a lattice kinda graph where each node is either a torch node that has power 16 or wire node where value is 0,
if power node is connected to wire node, it will transmit power to wire and value would become 15 from 0 (1 value would be lost during transmission), again if this wire node is connected to another wire node then value would become 14 of that node
for eg 16 -> 0 -> 0 would become 15 -> 14 -> 13, unless there is one more torch node ahead, then
16 -> 0 -> 0 -> 16
16 -> 15 -> 14 -> 16
16 -> 15 -> 15 <- 16
nothing was given, I had to tell how the representation would look like, in the end we need to return graph when the power had transmitted from all torch nodes to expected wire nodes. And graph in kinda lattice, like a cube (3 d).
I represented graph using unordered_map<node, vector>
where node is (block, data){
this.block = block
this.data = data
}
sample graph:

my visualization

the representation would look something like
{
[{a,16}] = [{b,10}]
[{b, 0}] = [{f,0}]
[{f,0}] = [{e,16}, {g,0}]
...
}
then given source vertex, we can run bfs and process the nodes, maintaing parent node also
if parent node is 16 then change child value to 15
if parent node is other than 16 then change child value to parent.value - 1
Interviewer was not helping at all, also he didnt seem satisfied neither he said anything on what else I could do. He was in so rush, jumped on to question very fast and also explaining very fast.