Looks like no one added any tags here yet for you.
What is a reference variable?
any variable that refers to
an Object
What is an iterator?
provides a standard way to access
all of the references stored in a collection.
What’s the major difference between the Iterator and ListIterator interfaces?
The major difference is that ListIterator can traverse the list in both directions (forward and backward), while Iterator can only traverse in one direction.
What is Big O Notation?
mathematical notation used to describe the upper bound of an algorithm's runtime or space complexity as the input size grows.
What is the runtime for traversing an array? What about retrieving an item with an unknown location?
O(N), O(1)
What is the runtime for traversing a binary tree? What about retrieving an item with an unknown location?
O(N), O(N)
What is the runtime for traversing an ArrayList? What about retrieving an item with an unknown location?
The runtime for traversing an ArrayList is O(N), and retrieving an item with an unknown location is O(1) if the index is known.
Which is the most ideal implementation between O(N2), O(N*log2N), O(N), O(log2N)?
O(log2N) is the most ideal implementation as it indicates a logarithmic time complexity which is very efficient.
What is required for a binary search to work?
For a binary search to work, the data must be sorted.
What is the average case Big O of the binary search? What about the linear search?
The average case Big O of a binary search is O(log2N) and for a linear search, it is O(N).
How does the Selection Sort algorithm work?
The Selection Sort algorithm works by repeatedly selecting the smallest (or largest) element from the unsorted portion and moving it to the beginning.
How does the Insertion Sort algorithm work?
The Insertion Sort algorithm works by building a sorted array one element at a time, repeatedly taking an element from the unsorted portion and inserting it into the correct position in the sorted portion.
How does the Quick Sort algorithm work?
The Quick Sort algorithm works by selecting a 'pivot' element and partitioning the array into two sub-arrays, one with elements less than the pivot and one with elements greater, and then recursively sorting the sub-arrays.
How does the Merge Sort algorithm work?
The Merge Sort algorithm works by dividing the array into halves, sorting each half, and then merging the sorted halves back together.
What is a set?
A set is a collection of distinct elements that does not allow duplicate values.
What is a hash table?
A hash table is a data structure that implements an associative array, using a hash function to compute an index into an array of buckets or slots.
What is a binary tree?
A binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child.
What is a map?
A map is a collection of key-value pairs, where each key is unique and used to access its corresponding value.
What is the primary difference in the data when stored in a TreeMap and HashMap?
The primary difference is that a TreeMap stores its entries in a sorted order based on the keys, while a HashMap does not guarantee any specific order.
How many possible digits are included in the binary number system? What is the maximum digit?
There are 2 possible digits in the binary number system: 0 and 1, with the maximum digit being 1.
How many possible digits are included in the octal number system? What is the maximum digit?
There are 8 possible digits in the octal number system: 0 to 7, with the maximum digit being 7.
How many possible digits are included in the decimal number system? What is the maximum digit?
There are 10 possible digits in the decimal number system: 0 to 9, with the maximum digit being 9.
How many possible digits are included in the hexadecimal number system? What is the maximum digit?
There are 16 possible digits in the hexadecimal number system: 0 to 9 and A to F, with the maximum digit being F.
What common mathematical operation is being performed by doing a bitwise SHIFT LEFT?
A bitwise SHIFT LEFT operation effectively multiplies the number by two for every shift.
What is an interface?
An interface in programming is a reference type that defines a contract of methods that implementing classes must provide.
What are the default settings for methods in an interface? What about instance variables?
By default, methods in an interface are public and abstract, while instance variables are implicitly public, static, and final.
How many other interfaces can an interface extend?
An interface can extend one or more other interfaces.