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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:58:39+00:00 2026-05-28T14:58:39+00:00

The Title is self explanatory. This was an interview question. In java, List is

  • 0

The Title is self explanatory. This was an interview question. In java, List is an interface. So it should be initialized by some collection.

I feel that this is a tricky question to confuse. Am I correct or not? How to answer this question?

  • 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-05-28T14:58:40+00:00Added an answer on May 28, 2026 at 2:58 pm

    Assuming you don’t have a copy of the original List, and the randomizing algorithm is truly random, then no, you cannot restore the original List.

    The explanation is far more important on this type of question than the answer. To be able to explain it fully, you need to describe it using the mathematical definitions of Function and Map (not the Java class definitions).

    A Function is a Map of Elements in one Domain to another Domain. In our example, the first domain is the “order” in the first list, and the second domain is the “order” in the second list. Any way that can get from the first domain to the second domain, where each element in the first domain only goes to one of the elements in the second domain is a Function.

    What they want is to know if there is an Inverse Function, or a corresponding function that can “back map” the elements from the second domain to the elements in the first domain. Some functions (squaring a number, or F(x) = x*x ) cannot be reversed because one element in the second domain might map back to multiple (or none) elements in the first domain. In the squaring a number example

    F(x) = x * x
    F(3) = 9     or (  3 -> 9)
    F(12) = 144  or ( 12 -> 144)
    F(-11) = 121 or (-11 -> 121)
    F(-3) = 9    or ( -3 -> 9)
    

    attempting the inverse function, we need a function where

    9 maps to 3
    144 maps to 12
    121 maps to -11
    9 maps to -3
    

    Since 9 must map to 3 and -3, and a Map must have only one destination for every origin, constructing an inverse function of x*x is not possible; that’s why mathematicians fudge with the square root operator and say (plus or minus).

    Going back to our randomized list. If you know that the map is truly random, then you know that the output value is truly independent of the input value. Thus if you attempted to create the inverse function, you would run into the delimma. Knowledge that the function is random tells you that the input cannot be calculated from the output, so even though you “know” the function, you cannot make any assumptions about the input even if you have the output.

    Unless, it is pseudo-random (just appears to be random) and you can gather enough information to reverse the now-not-truly random function.

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

Sidebar

Related Questions

The title of this question should be pretty self explanatory. I am making an
The title of this question should be self explanatory, but basically I have this
The title of this question is self-explanatory. I've heard I can mimic this using
I guess that title is self-explanatory. Is there any such effort been made? Some
I am aware that the title is not self-explanatory but this is the simplest
Title is quite self explanatory, but I have some animation being done in a
with the title being self-explanatory enough, if you do reach this max number, what
The title is self explanatory. For some reason in the loop in int main(),
The title is pretty much self-explanatory, I'm killing myself over this simplicity. Looked here
title is self explanatory i think.. is there anyway to make a list of

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.