title: Using an ArrayList to create a dynamic 2d array of integers
body: <p>So I'm trying to implement this pseudo-code for the radix sort and don't understand how to create a 2D ArrayList that this code is implying must be created. I've looked at other posts on creating a 2D ArrayList but don't understand how to properly implement it in this situation. Any help would be much appreciated.</p>
  
  <pre><code>RadixSort(array, arraySize) {
  
     buckets = create array of 10 buckets
  
     // Find the max length, in number of digits
  
     maxDigits = RadixGetMaxLength(array, arraySize)
  
     // Start with the least significant digit
  
     pow10 = 1
  
     for (digitIndex = 0; digitIndex &lt; maxDigits; digitIndex++) {
  
    for (i = 0; i &lt; arraySize; i++) {
  
       bucketIndex = abs(array[i] / pow10) % 10
  
       Append array[i] to buckets[bucketIndex]
    }
  
    arrayIndex = 0
  
    for (i = 0; i &lt; 10; i++) {
  
       for (j = 0; j &lt; buckets[i].size(); j++)
  
          array[arrayIndex++] = buckets[i][j]
  
    }
  
    pow10 = 10 * pow10
  
    Clear all buckets
  
     }
  
  }
  </code></pre>