# Module quiz: Introduction to data structures

1. **What do TSV files use to separate their data?**
    
    * <mark>Tabs</mark>
        
    * Types
        
    * Topic
        
2. **Arrays are always stored on the stack?**
    
    * <mark>No</mark>
        
    * Yes, but only through making a shallow-copy.
        
    * Yes, but only through making a deep-copy.
        
3. **What happens when you try to retrieve a value using a number greater than the index size?**
    
    * <mark>It would throw an error.</mark>
        
    * It would return a warning and a message indicating the issue.
        
    * Nothing. There would be nothing to retrieve so it would return null.
        
4. **In relation to computer science, what is a class?**
    
    * It is the thing from which arrays are build.
        
    * An object that has functionality.
        
    * <mark>It is a blueprint for an object.</mark>
        
5. **In relation to objects, what are instance variables?**
    
    * An attribute that has an immediate impact when compiled.
        
    * Attributes that can take on many forms.
        
    * <mark>Characteristics of the class.</mark>
        
6. **How many children can a node in a binary tree have?**
    
    * 1
        
    * 4
        
    * <mark>2</mark>
        
7. **Which of the following uses a FIFO approach.**
    
    * <mark>Queues</mark>
        
    * Stacks
        
    * Lists
        
8. **In relation to data structures what does synchronization mean?**
    
    * <mark>Making a class thread safe.</mark>
        
    * It is something to do with swimming.
        
    * Relates to a measured way of increasing the size of an object.
        
9. **Why do you need to implement a comparator when storing objects on a tree?**
    
    * So that the compiler can know to keep the tree balanced by comparing a number of nodes.
        
    * To ensure that values don’t clash when being added to a tree.
        
    * <mark>As a means of comparing objects so the tree knows which node to store an object on.</mark>
        
10. **Why are heaps called heaps?**
    
    * The order of importance is determined by where in the data structure the information is found.
        
    * <mark>The organization of their data is done in a very loose way, so it is said that the elements are heaped together.</mark>
        
    * Because they store a selection of different data types.
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728195776541/6fe35250-a512-4cfe-96d0-5f94d4c81c44.png align="center")
