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 8780735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:07:54+00:00 2026-06-13T20:07:54+00:00

I have an hash map, which maps integers to array of ArrayLists. For example,

  • 0

I have an hash map, which maps integers to array of ArrayLists. For example, my data structure is the following:

7->((7,5,**4,3,1**),(7,6,4,3,1))
4->((4,2,1),(4,3,1))

Here, 7 is key, and arraylist e.g is (7,5,4,3,1), the array of arraylist in turn is ((7,5,4,3,1),(7,6,4,3,1))

4 is key, and arraylist e.g. is (4,2,1), the array of arraylist in turn is ((4,2,1),(4,3,1))

I wish to substitute the key values (in any given arraylist) and the values following it to create other arraylists, one example of this is given below:

7->((7,5,**4,2,1**),(7,6,4,2,1),(7,5,4,3,1),(7,6,4,3,1))

the thing I am not getting is how to obtain this substitution….to create bigger arraylists

the thing I am not getting is how to obtain this substitution….to create bigger arraylists..i know the datastructure..but want to create arraylists by substitution as given in subsequent example

Is there someway in java programming by which I may achieve this?
I am a novice at Java programming…I thought long about this but could not move it…can someone please help

  • 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-13T20:07:55+00:00Added an answer on June 13, 2026 at 8:07 pm
    HashMap<Integer,ArrayList<ArrayList<Integer>>> map;
    map = new HashMap<Integer,ArrayList<ArrayList<Integer>>>();
    

    EDIT: I’ve used 2 lines so that my answer could be more readable.

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

Sidebar

Related Questions

I already have an Hash map of school which has key as student's first
I have a vector which contains a list of Hash maps in Clojure and
I've created the following structure which maps unique double values to one or more
I have created a hash map in which each entry corresponds to 3 values
In class 1 I have a hashmap which I send to my CustomAdapter. map.put(year,
I have a Hash Map (many-to-one relationship between texts and boolean values): name flag
I have intialized Hash map inside static block, I need to access the hashmap
I have implemented the Data Mapper pattern with the Identity Map pattern. In short:
I have two Maps that contain the same type of Objects: Map<String, TaskJSO> a
Following is my data structure to store data and a method for updating data.

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.