Lecture 8, 10, 11

 0    23 Fiche    kapi2304
скачать mp3 басу ойын өзіңді тексер
 
сұрақ język polski жауап język polski
What does a bubble sort do?
оқуды бастаңыз
Sorts a list by comparing two items that are side by side, to see which is out of order
Consider the following sorting algorithms. I. Quicksort and II. Mergesort Which of them perform in least time in the worst case?
оқуды бастаңыз
II
Which of the following algorithm design technique is used in merge sort?
оқуды бастаңыз
Divide and Conquer
You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task?
оқуды бастаңыз
Insertion sort
Consider an array of elements arr[5]= {5,4,3,2,1}, what are the steps of insertions done while doing insertion sort in the array.
оқуды бастаңыз
4 5 3 2 1 3 4 5 2 1 2 3 4 5 1 1 2 3 4 5
In a max-heap, element with the greatest key is always in the which node?
оқуды бастаңыз
root node
The worst case complexity of deleting any arbitrary node value element from heap is
оқуды бастаңыз
O(logn)
An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of
оқуды бастаңыз
O(n*logn)
Heap exhibits the property of a binary tree?
оқуды бастаңыз
true
What is the complexity of adding an element to the heap?
оқуды бастаңыз
O(log n) & O(h)
What is the time complexity to get the max element in a heap?
оқуды бастаңыз
O(1)
The Process of inserting an element in stack is called
оқуды бастаңыз
Push
Process of removing an element from stack is called __________
оқуды бастаңыз
pop
Pushing an element into stack already having five elements and stack size of 5, then stack becomes
оқуды бастаңыз
Overflow
Entries in a stack are “ordered”. What is the meaning of this statement?
оқуды бастаңыз
There is a Sequential entry that is one by one
Which of the following is not the application of stack?
оқуды бастаңыз
Data Transfer between two asynchronous process
A queue follows __________
оқуды бастаңыз
FIFO (First In First Out) principle
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as _____________
оқуды бастаңыз
Queue
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
A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
оқуды бастаңыз
tail= MAX_SIZE – 1
A stack follows __________
оқуды бастаңыз
LIFO (Last in First Out)
Which of the following is not an advantage of a priority queue?
оқуды бастаңыз
Easy to delete elements in any case
What is the time complexity to insert an element in a priority queue?
оқуды бастаңыз
O(logn)

Пікір қалдыру үшін жүйеге кіру керек.