question Flashcards
is a linear data structure which follows a particular order in which the operations are performed.
stack
The order may be LIFO(Last In First Out) or FILO(First In Last Out).
stack
Stack terminology ( 2 )
push() pop()
(storing) an element on the stack.
push
Removing (accessing) an element from the stack.
pop()
get the top data element of the stack, without removing it
peek()
The way to write arithmetic expression is known as a _______
notation
Notations ( 3 )
infix, prefix, postfix
where operators are used in-between operands.
infix notation
the operator is written after the operands.
postfix notation
is an abstract data structure, somewhat similar to Stacks.
queue
The process of putting a new data element onto stack is known as a
push operation
operator is written ahead of operands.
prefix notation
This notation style is known asReversed Polish Notation
postfix notation
This search algorithm works on the principle of divide and conquer.
Binary Search
True or false
Interpolation search is an improved variant of binary search
true
True or false
In interpolation, the data collection should be in a sorted form and equally distributed
true
True or false
In interpolation, The algorithm works on the probing position of the required value
true
True or false
Binary search looks for a particular item by comparing the middle most item of the collection
true
In this type of search, a sequential search is made over all items one by one
Linear Search
this search is a fast search algorithm with run-time complexity of Ο(log n
Binary Search
this search is an improved variant of binary search.
interpolation search
For this algorithm to work properly, the data collection should be in the sorted form
binary search
the data collection should be in a sorted form and equally distributed.
interpolation search
Most common orders are in numerical or lexicographical order
sorting
True or false
Bubble sort is a simple sorting algorithm
true
algorithm is comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order.
bubble sort
This is an in-place comparison-based sorting algorithm
insertion sort
a sub-list is maintained which is always sorted.
insertion sort
an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list.
selection sort
The smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array.
selection sort
a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.
merge sort
a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays.
quick sort
is a highly efficient sorting algorithm and is based on insertion sort algorithm.
shell sort
This algorithm uses insertion sort on a widely spread elements, first to sort them and then sorts the less widely spaced elements. This spacing is termed asinterval.
shell sort
refers to arranging data in a particular format.
sorting
True or false
linear search is an improved variant of binary search
false
True or false
Thetoppointer provides top value of the stack without actually removing it.
true
True or false
stack data structure which follows first in first out methodology.
false
provides top value of the stack without actually removing it.
top pointer
known as reversed polish notation
postfix notation
known as polish notation
prefix notation
add (store) an item to the queue.
enqueue
remove (access) an item from the queue.
dequeue
is open at both its ends
queue