Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is a collection? What is a data type? What is an abstract data type? What i

ID: 666612 • Letter: W

Question

What is a collection?

What is a data type?

What is an abstract data type?

What is a data structure?

What is abstraction and what advantage does it provide?

Why is a class an excellent representation of an abstract data type?

What is the characteristic behavior of a stack?

What are the five basic operations on a stack?

What are some of the other operations that might be implemented for a stack?

What is key to remember when handling linked lists?

Explain how a linked list is formed using object reference variables.

How do object references help us define data structures?

Compare and contrast a linked list and an array.

What special case exists when managing linked lists?

Why should a linked list node be separate from the element stored on the list?

What do the LinkedStack<T> and ArrayStack<T> classes have in common?

What would be the time complexity of the push operation if we chose to push at the end of the list instead of the front?

What is the difference between a doubly linked list and a singly linked list?

What impact would the use of sentinel nodes or dummy nodes have upon a doubly linked list implementation?

What are the advantages to using a linked implementation as opposed to an array implementation?

What are the advantages to using an array implementation as opposed to a linked implementation?

What are the advantages of the java.util.Stack implementation of a stack?

What is the potential problem with the java.util.Stack implementation?

What is the advantage of postfix notation?

What is the difference between a queue and a stack?

What are the five basic operations on a queue?

What are some of the other operations that might be implemented for a queue?

makeEmpty(), destroy(), full()

Is it possible for the front and rear references in a linked implementation to be equal?

Is it possible for the front and rear references in a circular array implementation to be equal?

Which implementation has the worst time complexity?

Which implementation has the worst space complexity?

What is the difference between an indexed list, an ordered list, and an unordered list?

What are the basic methods of accessing an indexed list?

What are the additional operations required of implementations that are part of the Java Collections API framework?

What is the trade-offs in space complexity between an ArrayList and a LinkedList?

What is the software life cycle? Describe each model

Select one of the software life cycle models and applied its concept on one of your projects assignments.

What is the trade-offs in time complexity between an ArrayList and a LinkedList?

What is the time complexity of the contains operation and the find operation for both implementations?

What effect would it have if the LinkedList implementation were to use a singly

Why is the time to increase the capacity of the array on an add operation considered negligible for the ArrayList implementation?

What is an iterator and why is it useful for ADTs?

Why was an iterator not appropriate for stacks and queues but it is appropriate for lists?

Why is a circular array implementation not as attractive as an implementation of a list as it was for a queue?

What is the output of the following program?

//********************************************************************

// recurse.java       Author: Chase

//

// Demonstrates recursion.

//********************************************************************

public class recurse2

{

//-----------------------------------------------------------------

   public static void main (String[] args)

   {

      recurse(3);

      System.out.print("---");

      recurse(2);

   }

   public static void recurse(int x)

   {

      if (x<=1)

         System.out.print("***");

      else if ((x % 2) == 0)

         {

            System.out.print("+++");

            recurse(x-2);

         }

      else

         {

            System.out.print(x);

            recurse(x-1);

         }

   }

}

What is recursion?

What is infinite recursion?

When is a base case needed for recursive processing?

Is recursion necessary?

When should recursion be avoided?

What is indirect recursion?

Explain the general approach to solving the Towers of Hanoi puzzle. How does it relate to recursion?

When would a linear search be preferable over a binary search?

Show the steps of an Insertion Sort for the numbers ( 5 3 9 5 ).

Show the steps of a Selection Sort for the numbers ( 5 3 9 5 ).

Which searching method requires that the list be sorted?

When would a sequential sort be preferable to a recursive sort?

The insertion sort algorithm sorts using what technique?

The bubble sort algorithm sorts using what technique?

The selection sort algorithm sorts using what technique?

The quick sort algorithm sorts using what technique?

The merge sort algorithm sorts using what technique?

How many queues would it take to use radix sort to sort names stored as all lowercase?

What is a tree?

What is a node?

What is the root of the tree?

What is a leaf?

What is an internal node?

Define the height of a tree.

Define the level of a node.

What are the advantages and disadvantages of the computational strategy?

What are the advantages and disadvantages of the simulated link strategy?

What attributes should be stored in the TreeNode class?

Which method of traversing a tree would result in a sorted list for a binary search tree?

What is the difference between a binary tree and a binary search tree?

Why are we able to specify addElement and removeElement operations for a binary search tree but we were unable to do so for a binary tree?

Assuming that the tree is balanced, what is the time complexity (order) of the addElement operation?

Without the balance assumption, what is the time complexity (order) of the addElement operation?

a degenerate tree might actually be less efficient than a linked list. Why?

Our removeElement operation uses the inorder successor as the replacement for a node with two children. What would be another reasonable choice for the replacement?

RemoveFirst and first were O(1) operations for our earlier implementation of an ordered list. Why are they less efficient for our BinarySearchTreeOrderedList?

Why does the BinarySearchTreeOrderedList class have to define the iterator method? Why can it not just rely on the iterator method of its parent class like it does for size and isEmpty?

What is the time complexity of the addElement operation after modifying to implement an AVL tree?

What imbalance is fixed by a single right rotation?

What imbalance is fixed by a leftright rotation?

What is the balance factor of an AVL tree node?

We noted that the balance restriction for a red/black tree is less strict than that of an AVL tree and yet we still claim that traversing the longest path in a red/black tree is still O(log n). Why?

What is the difference between a TreeSet and a TreeMap?

What is the difference between a heap (a minheap) and a binary search tree?

What is the difference between a minheap and a maxheap?

What does it mean for a heap to be complete?

Does a heap ever have to be rebalanced?

The addElement operation for the linked implementation must determine the parent of the next node to be inserted. Why?

Why does the addElement operation for the array implementation not have to determine the parent of the next node to be inserted?

What is the time complexity of the addElement operation?

What is the time complexity of the removeMin operation?

What is the time complexity of heap sort?

Describe the nodes in a 2-3 tree.

When does a node in a 2-3 tree split?

How can splitting a node in a 2-3 tree affect the rest of the tree?

Describe the process of deleting an element from a 2-3 tree.

Describe the nodes in a 2-4 tree.

How do insertions and deletions in a 2-4 tree compare to insertions and deletions in a 2-3 tree?

When is rotation no longer an option for rebalancing a 2-3 tree after a deletion?

What is the difference between a graph and a tree?

What is an undirected graph?

What is a directed graph?

What does it mean to say that a graph is complete?

What is the maximum number of edges for an undirected graph? A directed graph?

What is the definition of path? Of cycle?

What is the difference between a network and a graph?

What is a spanning tree? A minimum spanning tree?

What is a collision in a hash table?

What is a perfect hashing function?

What is our goal for a hashing function?

What is the consequence of not having a good hashing function?

What is the extraction method?

What is the division method?

What is the shift folding method?

What is the boundary folding method?

What is the mid-square method?

What is the radix transformation method?

What is the digit analysis method?

What is the length-dependent method?

What is chaining?

What is open addressing?

What are linear probing, quadratic probing, and double hashing?

Why is deletion from an open addressing implementation a problem?

What is the load factor and how does it affect table size?

What is a set?

What would the time complexity be for the size operation if there were not a count

variable?

What would the time complexity be for the add operation if there were not a count variable?

What do the LinkedSet<T> and ArraySet<T> classes have in common?

What would be the time complexity of the add operation if we chose to add at the end of the list instead of the front?

What is the difference between a set and a map?

What are the potential advantages of a map over a set?

Explanation / Answer

1.
Collections in java is a framework that provides an architecture to store and manipulate the group of objects. Example Map, List etc.

2.
Data types are the type of data a variable corresponds to. Example String, int etc.

3.
Abstract Data Type is a set of operation and set of data is used for storing some other data efficiently in the machine.

4.
A data structure is a specialized format for organizing and storing data. Example array, lists etc.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote