Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A question concerning algorithms

  1. Oct 6, 2009 #1
    http://img207.imageshack.us/img207/8504/questionw.jpg [Broken]


    1st question: "with at most a constant number of them stored outside the array any time."
    Is that array the sub-array of the sorted numbers?

    2nd question: what does the "i" represent? it`s not even mentioned in the text (only in the code)
     
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Oct 6, 2009 #2
    "with at most ... at any time" means that value of member jth of A will be stored in variables outside of A (in this case, k). This step helps you save the value when you rearrange the array A, i think.

    Variables i is declared in line 4 (like j declared in line 1). i is equal to (j - 1 ).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: A question concerning algorithms
  1. Ask an algorithm (Replies: 3)

  2. Knuth Algorithm (Replies: 3)

Loading...