Quiz
Untitled
Questions in this quiz (3)
1Which of the following is not a limitation of an array?
- AChecking whether an element is contained in the array can be time consuming
- BReplacing an element at a specified index of the array can be time consuming
- CWe need to specify the size of the array ahead of time
- DAdding an element to the front of an array can be time consuming
2which of these operations would NOT take relatively long amount of time?
- AReplacing a specific element in the array given its value but not its index
- BRe-sizing the array
- CAccessing the element at a given index in the array
- DRemoving an element from the array
3Suppose we used an int array arr of size N+1 to keep track of the frequency with which we have seen a given number in the interval [0 … N]. That is, arr[i] = x if we have seen number i a total of x times so far. What limitation of arrays should we still be concerned about in this specific context?
- AWe cannot easily insert an element in front of others.
- BChecking whether an array contains a number can be time consuming
- CThe array may be too large (wasted space)
- DAll of the above
Information
- Description
- Data Structures (Core Data Structures) Quiz on Untitled, created by Alex Keat on 03/09/2018.
- Author
- Alex Keat
- Language
- English
- Views
- 0
- History
- Created on 3 Sep 2018 · updated on 5 Sep 2018
- Tags
- Rating
- No ratings yet Rate this quiz