Pergunta de entrevista da empresa Digital Extremes

Implement the "findPowerUp" function sketched out in Main.cpp. It is to find a path through the graph of PathNodes to the nearest PowerUp of the given mType. Return NULL for no-path, or return an allocated array containing the path as shown in the function skeleton. We are looking for the shortest path to a matching powerup -- ie. the path where the sum of the edge weights is minimized, where an edge weight is the distance between connected vertexes. Please briefly describe the algorithm you chose and why you chose it in a comment block at the top of the function. You will be evaluated on correctness, efficiency from a performance and memory perspective, as well as general code structure and understandability. Please assume that your code may be called from a multi-threaded environment (more than 1 search query at the same time).