question Flashcards

1
Q

is a linear data structure which follows a particular order in which the operations are performed.

A

stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The order may be LIFO(Last In First Out) or FILO(First In Last Out).

A

stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Stack terminology ( 2 )

A

push() pop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

(storing) an element on the stack.

A

push

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Removing (accessing) an element from the stack.

A

pop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

get the top data element of the stack, without removing it

A

peek()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The way to write arithmetic expression is known as a _______

A

notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Notations ( 3 )

A

infix, prefix, postfix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

where operators are used in-between operands.

A

infix notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

the operator is written after the operands.

A

postfix notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

is an abstract data structure, somewhat similar to Stacks.

A

queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The process of putting a new data element onto stack is known as a

A

push operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

operator is written ahead of operands.

A

prefix notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This notation style is known asReversed Polish Notation

A

postfix notation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This search algorithm works on the principle of divide and conquer.

A

Binary Search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

True or false
Interpolation search is an improved variant of binary search

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or false
In interpolation, the data collection should be in a sorted form and equally distributed

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

True or false
In interpolation, The algorithm works on the probing position of the required value

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

True or false
Binary search looks for a particular item by comparing the middle most item of the collection

A

true

20
Q

In this type of search, a sequential search is made over all items one by one

A

Linear Search

21
Q

this search is a fast search algorithm with run-time complexity of Ο(log n

A

Binary Search

22
Q

this search is an improved variant of binary search.

A

interpolation search

23
Q

For this algorithm to work properly, the data collection should be in the sorted form

A

binary search

24
Q

the data collection should be in a sorted form and equally distributed.

A

interpolation search

25
Q

Most common orders are in numerical or lexicographical order

A

sorting

26
Q

True or false
Bubble sort is a simple sorting algorithm

A

true

27
Q

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.

A

bubble sort

28
Q

This is an in-place comparison-based sorting algorithm

A

insertion sort

29
Q

a sub-list is maintained which is always sorted.

A

insertion sort

30
Q

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.

A

selection sort

31
Q

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.

A

selection sort

32
Q

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.

A

merge sort

33
Q

a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays.

A

quick sort

34
Q

is a highly efficient sorting algorithm and is based on insertion sort algorithm.

A

shell sort

35
Q

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.

A

shell sort

36
Q

refers to arranging data in a particular format.

A

sorting

37
Q

True or false
linear search is an improved variant of binary search

A

false

38
Q

True or false
Thetoppointer provides top value of the stack without actually removing it.

A

true

39
Q

True or false
stack data structure which follows first in first out methodology.

A

false

40
Q

provides top value of the stack without actually removing it.

A

top pointer

41
Q

known as reversed polish notation

A

postfix notation

42
Q

known as polish notation

A

prefix notation

43
Q

add (store) an item to the queue.

A

enqueue

44
Q

remove (access) an item from the queue.

A

dequeue

45
Q

is open at both its ends

A

queue