Someone mentioned in an answer that the following problem can be solved using only DFS/BFS: http://www.spoj.com/problems/PRATA/ I am not getting any idea on how to solve this problem without using Dijkstra's algo/ MST. Binary Search is another approach. Can anyone tell how to solve this using only BFS/DFS? asked 31 Dec '14, 21:54

Okay, I took a quick look. If there are any errors, I'll fix them as soon as I wake up: (Presuming different chefs can cook simultaneously.) You've to pick P Pratas. Each time you're assigning a Prata to a chef, you pick the chef which gives the next Prata earliest. Don't view time as same for all, but store the internal time I don't know why you ask for "only BFS/DFS" if you can find an efficient solution elsewhere. EDIT: Struck me as soon as I pressed submit, and then I also found this on the main discussion channel. The solution removes the Hope that helps. Cheers! answered 01 Jan '15, 00:25
