Note that there are some explanatory texts on larger screens.

plurals
  1. USJim
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. CO@IraBaxter That is why I asked. Note that the two appearances of a quote symbol in the original post are quite different, one is B' the other is '+. I was hoping the original poster would clean up the typo either by removing the quote characters, or by making them appropriate. I will edit it and see if anyone approves my edit.
      singulars
    2. COYour vertices variable is undefined. Shouldn't this generator return a graph rather than a void? I don't see how your code is communicating to the graph what the edges in the graph are. There is a lot more to a graph than a collection of vertices. Please add a Graph object to the example so that we can see what your graph *is*. Consider using a static variable for random and initializing only once, this was once needed, now it is more of a style issue.
      singulars
    3. COSome commentary on the program would help. The while loop does nothing other than loop for (100 minus the original value of a) times. A *for* loop often better expresses this thought. The variable z appears to be a quantity to be deducted from one or more arr2[] elements, those whose corresponding arr[] element is greater than or equal to the current value of x. It may be that the while loop should check to see if x has become negative, or possibly not. The supplied code could be confusingly nearly correct, or it could be terribly wrong; it really depends upon the goal of the code.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload