daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. generateSteps(Vertex start, steps)
  2.     push start to stack
  3.     set all start edges weight to 0
  4.    
  5.     while stack size is > 0 AND currentvertex weight < steps
  6.         currentvertex equals pop stack
  7.        
  8.         for v all vertexes connected to currentvertex
  9.             if v is undiscovered
  10.                 push v to stack
  11.                 v weight equals currentvertex+1
  12.                 set v as discovered
  13.                
  14.         set currentvertex as fully discovered
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top