- 2

True or false

Which of the following statement is FALSE? * 1. A linked list data structure provides better memory management than arrays 2.Apart from the root element, every element in a tree has a parent and one or more children elements 3. In object-oriented programming, an object is an instance of a class. 4. None of the above

9th Feb 2019, 11:45 AM
Shiz Carrey
Shiz Carrey - avatar
1 Respuesta
+ 2
1. True, a linked list reserve memory and free it as needed, while with an array the size is set at creation. 2. False. Nodes may have 0 children (and those nodes are called leaves). Pretty obvious since there is no loop in a tree and the branches have to stop somewhere. 3. True by definition.
9th Feb 2019, 1:07 PM
Zen
Zen - avatar