Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8850741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:58:18+00:00 2026-06-14T12:58:18+00:00

How do I add each element into an arrayqueue? Basically, if I have an

  • 0

How do I add each element into an arrayqueue? Basically, if I have an array of queues where each index is an arrayqueue that holds the 1s, 10s, 100s, etc. place of a corresponding 6 digit number in another index of array a. For example, if a[1] is 123456 then how can I make the code below hold arr[1] 654321? I’ve posted a question similar to this before but I’m just trying to get this right.

public static void radixSort(int[] a) {
  //Create an array of 10 empty array queues
  Queue[] arr =  new Queue[a.length];

  for (int i = 0; i < arr.length; i++)
      arr[i] = new ArrayQueue();

  for (int place = 1; place <= 100000; place *= 10) {
      for (int i = 0; i < a.length; i++) {
          arr[i].add(selectDigit(a[i],place));
         // System.out.println("i: " + i + " a[i]: " + a[i] + " place: " + place + " digit: "  + selectDigit(a[i],place));
      }
  }

 // for (int i = 0; i < arr.length; i++)
    //  System.out.print(arr[i].remove()+ " ");
          //for (int j = 0; j < arr.length; j++)
            //  a[j] = (Integer) arr[j].remove();   
  } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:58:20+00:00Added an answer on June 14, 2026 at 12:58 pm

    This tutorial might help:
    http://www.sourcecodesworld.com/articles/java/java-data-structures/Radix_sort.asp

    It seems a good walk through.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a number of trait s that each add some behaviour to
I have a piece of jQuery that loops through each element in a given
Im trying to add a class to a each element in a collection. I
Pseudo-code: for each x in someArray { // possibly add an element to someArray
I have a list of breakpoints which I want to add each time I
I have an ASP.NET MVC app and I want to add to each page
I am trying to add multiple markers each with its own infowindow that comes
I have this array (JQuery) where I add all my form's controls, it looks
I have an add method for creating a linked list that is unordered and
I would like to have a form that gets output into a table. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.