Q. Why is a dictionary termed as an unordered collection of objects?


Answer =

A dictionary is often referred to as an unordered collection of objects because the elements within a dictionary are not arranged in a specific order. In other words, the items in a dictionary do not have an inherent positional index like they do in a list or an array.

Instead of using numerical indices to access elements, a dictionary uses keys to uniquely identify and retrieve values associated with those keys. Each key in a dictionary must be unique, and it serves as a label or identifier for its corresponding value. The keys are used as a hash, allowing for efficient retrieval of values.

7 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. This is not an answer of this question

    ReplyDelete
    Replies
    1. It is unordered because it does not keep track of the order of data inserted and objects are not stored in contiguous location.

      Delete
  2. Old solutions

    ReplyDelete
  3. This should be question no.15... But no. 14 answer was on the hint... No need to answer

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post