Given the following Banana class in C++. Create a new Banana object properly
Banana sample("yellow");
How many null pointers exists in a circular linked list?
0
A function that changes the values of an object's attributes in a Class is also known as a:
Setter
Which sorting algorithm uses a pivot point?
Quick sort
Specify whether the statement below is valid or invalid.
Invalid
A function can have _____ inside the parenthesis
Arguments/Parameters
If the sequence of operations - push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values
2,2,1,1,2
Using a binary search why will the number 9 never be found in the following list: 11, 8, 13, 9, 7, 3
The list is not in order
What is the first change that insertion sort would make to this sequence? “6 2 5 9”
2 6 5 9
Which sorting algorithm splits a list of items into individual lists?
Merge
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
Make the following function return the following number in the fibonacci sequence
fibo(n-1)+fibo(n-2)
What is the worst case complexity of a quick sort algorithm?
O(𝒏^𝟐 )
When is Binary Search preferred over Linear Search?
Sorted Array
The object in the image resembles which data structure
Linked List
When struct is used instead of the keyword class means, what will happen in the program?
access is public by default
A ________ is blue print that defines certain characteristics and behavior. It is simply a representation of different types of objects.
Class
What is the output of the following program segment?
10
In C++ what the following command does: delete a;
Free memory allocated for the variable
We are sorting the following list in ascending order: 5 4 2 9 3 1 8 What does the list look like after ONE pass of the selection sort algorithm?
1 4 2 9 3 5 8
What output is displayed after the following segment of code executes:
10 an infinite number of times. top() simply copies the top element of the stack. Use push() to remove an element from the stack.
The maximum comparisons needed in Binary Search on array of size 16 is:
4
In linked list implementation of a queue, the important condition for a queue to be empty is?
FRONT is null
What advantage does a linked list have over an array?
A linked list is not of a fixed size
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
Bubble Sort
Your experience on this site will be improved by allowing cookies.