Question

Can you please help with the below? 1)   Which of the following is true about using...

Can you please help with the below?


1)   Which of the following is true about using a 2-3-4 tree?
a.   It is designed to minimize node visits while keeping to an O(log n) search performance
b.   It is designed to self-balance as new values are inserted into the tree
c.   As soon as a node becomes full, it performs the split routine
d.   None of the above

2)   Which of the following is true about a binary search tree?
a.   Delete is O(log n) unless the tree is balanced
b.   Insert is O(log n) if the data set being entered contains randomly distributed values
c.   Search is O(log n) in most cases because the algorithm is similar to the binary search algorithm
d.   None of the above

3)   Which of the following sort algorithms is usually implemented using recursion?
a.   Quicksort
b.   Mergesort
c.   Bubblesort
d.   None of the above

4)   Which of the following is true about the concept of recursion?
a.   It can simplify the amount of code that is written
b.   The base case of the function is where the recursion stops
c.   Recursive functions contain code that calls at least one function of the same name
d.   None of the above

5)   Which of the following is true about using a standard simple linked list?
a.   The insert at the front of the list function performs at O(n)
b.   The append function performs at O(n)
c.   The delete function, where it must first find the given value, performs at O(n)
d.   None of the above

6)   Which of the following is a reason to implement a stack as a linked list (with only a head pointer and no tail) instead of as an array?
a.   As a linked list, the stack will only use memory when it needs to
b.   The push function as a linked list will use the append function which makes the performance O(1)
c.   Stacks are not usually designed to perform searches for a particular value or displaying the contents in a certain order. This minimizes the disadvantages when using a linked list because search and display are not as important
d.   None of the above


7)   If a priority queue is implemented as a linked list, which of the following is true?
a.   If the insert function is O(1), the remove function will be O(n)
b.   If the insert function is O(n), the remove function will be O(1)
c.   If using a linked list, using an O(n) insert minimizes the performance cost because shifting elements does not require a loop to perform
d.   None of the above

8)   Which of the following is true about the manner in which items are added and removed with stacks and queues?
a.   A stack is FIFO (First In First Out)
b.   A queue is LIFO (Last In First Out)
c.   Stacks perform push and pop at O(n)
d.   None of the above

9)   Which of the following is true about the sorting algorithms?
a.   Selection sort is preferred over Bubble sort because the number of swaps is guaranteed to be O(n)
b.   Mergesort pays a price in memory usage because a duplicate size temporary array is necessary to perform the merging and sorting
c.   Quicksort is not as fast as Bubble sort
d.   None of the above

10)   Which of the following is true about the delete function for a binary search tree?
a.   If the node to delete is a leaf, it is simply removed
b.   If the node to delete has one child, the parent node adopts the child node of the node being removed
c.   If the node to delete has 2 children, the successor node can be the node that is closest in value and greater than the node that is being removed
d.   None of the above

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) A 23-y In designed to Nel -balance a, new v are inaoted into the trce Opton & correet Choice ExplinauHon e balancing data

Add a comment
Know the answer?
Add Answer to:
Can you please help with the below? 1)   Which of the following is true about using...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. static int function(int n){ return n * function(n + 1); } If you call the...

    1. static int function(int n){ return n * function(n + 1); } If you call the method function(2), the expected output is 3. True False 2. public void push(int new_data) { Node new_Node = new Node(new_data); new_Node.next = head; new_Node.prev = null; if (head != null) head.prev = new_Node; head = new_Node; } The code snippet depicts stack implementation True False 3. A ________ list is a linked data structure that consists of a set of sequentially linked records called...

  • This is a c programming problem. Would you please help me to write this problem??? I...

    This is a c programming problem. Would you please help me to write this problem??? I really appreciate it if you add comments for explanation step by step. Thank you. Reverse a Doubly linked list using recursion: Given a doubly linked list. Reverse it using recursion. Original Doubly linked list: next pointer - DDHIHI Null prev painter Reversed Doubly linked list: next pointer Start Pointer Null prev pointer Include: a) A struct for a node of the doubly linked list....

  • can anyone provide answers with explaination ? thanks a lot I. In the example of recycling...

    can anyone provide answers with explaination ? thanks a lot I. In the example of recycling the elements of a list in O1) time, which situation holds? A. Both lists are circular B. Both ists are not circular C. The list to be recycled is circular, the garbage list is not D. The garbage list is circular, the list to be recycled is not 2. What is the worst-case time to perform MINIMUML) for a sorted, doubly-linked list with nodes?...

  • Could someone please summarize the following for my programming class? They are study questions for java...

    Could someone please summarize the following for my programming class? They are study questions for java What an association list is. How to test if an association list is empty. How to find the value associated with a key in an association list. How to add a key-value pair to an association list. How to delete a key-value pair from an association list. How efficient an association list is (using O notation). What a circular list is. What a circular...

  • JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question...

    JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question 12 pts Which is a valid constructor for Thread? Thread ( Runnable r, int priority ); Thread ( Runnable r, String name ); Thread ( int priority ); Thread ( Runnable r, ThreadGroup g ); Flag this Question Question 22 pts What method in the Thread class is responsible for pausing a thread for a specific amount of milliseconds? pause(). sleep(). hang(). kill(). Flag...

  • Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up...

    Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up for helping. True/False (13) Chapter 14 - A List Implementation that Links Data Adding a node to an empty chain is the same as adding a node to the beginning of a chain. Adding a node at the end of a chain of n nodes is the same as adding a node at position n. You need a temporary variable to reference nodes as...

  • QUESTION 1 In a tree, a ____ is a node with successor nodes. root child descendent...

    QUESTION 1 In a tree, a ____ is a node with successor nodes. root child descendent parent sibling QUESTION 2 In a tree, the ____ is a measure of the distance from a node to the root. count degree branch height level QUESTION 3 Which of the following is not a characteristic of a binary search tree? Each node has zero, one, or two successors. The preorder traversal processes the node first, then the left subtree, and then the right...

  • Soukaina Filali Boubrahimi CSc 2720 Data Structures: Lab 8 Due Date: Sunday 31t Mar, 201911:59pm ...

    Soukaina Filali Boubrahimi CSc 2720 Data Structures: Lab 8 Due Date: Sunday 31t Mar, 201911:59pm We have seen in class how selection sort algorithm works on arrays data structure. In this lab we will practice how selection sort can be performed on a linked list ADT 1. Convert the following selection sort pseudo-code to perform the sort in ascending order (selectionsort asc function) a. Find the node with the minimum value in the linked list of length rn b. Append...

  • 1.    Consider the following function for an AVL tree with n nodes. void _removeLeftmost(struct Node *cur) {...

    1.    Consider the following function for an AVL tree with n nodes. void _removeLeftmost(struct Node *cur) { while(cur->left != 0) { cur = cur->left } free(cur); } What is the average case big-O complexity of _removeLeftmost()? a.    O(1) b.    O(log n) c.    O(n) d.    None of the above 2. Refer to _removeLeftmost() from Question 1. What is the worst case big-O complexity of _removeLeftmost() for a binary search tree (not necessarily an AVL tree) with n nodes? a.    O(1) b.    O(log n) c.    O(n) d.    None of the above

  • True/False Question 1. A Linked List will have no limited size. You may add or insert...

    True/False Question 1. A Linked List will have no limited size. You may add or insert as many elements as needed. True False 2. Linked List search is a linear search. Therefore it will be slow. True False 3. A JPanel can contain zero or more JPanels. True False 4. Users can interact with JLabel component. True False 5. This code is to add a panel to the south region of a JFrame JPanel panel = new JPanel (); frame.add...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT