title: Finding fastest path at additional condition
body: <p>I'm wondering, if Dijkstra's algorithm will work properly when there is more than one direct connection in an undirected graph.</p>
  
  <p>E.g.:</p>
  
  <p><img src="https://i.stack.imgur.com/gbnVD.png" alt="enter image description here"></p>
  
  <p>I want to use Dijkstra to find the fastest path but, there's an additional condition. Sum of all additional_data on the edges can't be >= x. So, if it came out that edge with weight: 3 was wrong to use, my program would try with the 2nd edge.</p>
  
  <p>edit:
  My task is to find the fastest path, under the additional condition that the sum of <code>additional_data</code> from the edges can not be higher than x. Could you tell me how to handle this problem?</p>
  
  <p><strong>edit2: (setting up on a bounty)</strong></p>
  
  <p>I've been researching internet alot untill I've found this <a href="http://community.topcoder.com/tc?module=Static&amp;d1=tutorials&amp;d2=dynProg" rel="noreferrer"><strong>link</strong></a>.
  There's an explanation of how to do the thing I'm asking for. (<strong>Upper-Intermediate</strong> acapite)</p>
  
  <p>I'm trying to use it somehow for 2 days now but I'm worried I do not understand this algorithm correctly. I'd like to ask some of you to help me with this problem, by explaining me a little more on example (few first steps). Here's the example:</p>
  
  <p><img src="https://i.stack.imgur.com/h2B4N.png" alt="enter image description here"></p>