COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
A structure that allows its data to be changed
|
|
A structure that allows its data to be edited
|
|
A structure that allows its data to be deleted
|
|
A structure that allows its data to be moved
|
Detailed explanation-1: -Mutable data refers to a database structure in which data can be changed. Any data changes made simply overwrite and replace the previous record. This means that previous iterations of data are lost unless there is a system of back-ups and transaction logs that track changes.
Detailed explanation-2: -To summarise the difference, mutable objects can change their state or contents and immutable objects can’t change their state or content. Immutable Objects : These are of in-built types like int, float, bool, string, unicode, tuple. In simple words, an immutable object can’t be changed after it is created.
Detailed explanation-3: -Mutable data types are those whose values can be changed or new values can be assigned to them. List, Sets, and Dictionary in Python are examples of some mutable data types in Python. Immutable data types are those, whose values cannot be modified once they are created.
Detailed explanation-4: -Python has three mutable data structures: lists, dictionaries, and sets. Immutable data structures, on the other hand, are those that we cannot modify after their creation. The only basic built-in immutable data structure in Python is a tuple.