Parallel Array

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is a disadvantage of parallel array over the traditional arrays?
When a language does not support records, parallel arrays can be used
Increased locality of reference
Ideal cache behaviour
Insertion and Deletion becomes tedious
Explanation:
Insertion and deletion of elements require to move every element from their initial positions. This will become tedious. For Record collection, locality of reference and Ideal Cache behaviour we can use parallel arrays.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
To search for an element in a sorted array, which searching technique can be used?
Linear Search
Jump Search
Binary Search
Fibonacci Search
Explanation:
Since the array is sorted, binary search is preferred as its time complexity is O(logn).
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is an advantage of parallel arrays?
Poor locality of reference for non-sequential access
Very little direct language support
Expensive to shrink or grow
Increased Locality of Reference
Explanation:
Elements in the parallel array are accessed sequentially as one arrays holds the keys whereas other holds the values. This sequential access generally improves Locality of Reference. It is an advantage.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
)
Explanation:
Question 5
Marks : +2 | -2
Pass Ratio : 100%
)
Explanation:
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Which of the following can be called a parallel array implementation?
Explanation:
Question 7
Marks : +2 | -2
Pass Ratio : 100%
What are parallel arrays?
Arrays of the same size
Arrays allocated one after the other
Arrays of the same number of elements
Arrays allocated dynamically
Explanation:
Different arrays can be of different data types but should contain same number of elements. Elements at corresponding index belong to a record.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
What is a sorted array?
Arrays sorted in numerical order
Arrays sorted in alphabetical order
Elements of the array are placed at equally spaced addresses in the memory
All of the mentioned
Explanation:
The array can be sorted in any way, numerical, alphabetical or any other way but the elements are placed at equally spaced addresses.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
)
Explanation:
All the arrays must have equal length, that is, contain same number of elements.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is not an application of sorted array?
Commercial computing
Priority Scheduling
Discrete Mathematics
Hash Tables
Explanation:
Sorted arrays have widespread applications as all commercial computing involves large data which is very useful if it is sorted. It makes best use of locality of reference and data cache. Linked lists are used in Hash Tables not arrays.