MCQs
It starts with the first element and continues in the same row until the end of row is reached and then proceeds with the next row. C follows row-major order.
The array can be sorted in any way, numerical, alphabetical or any other way but the elements are placed at equally spaced addresses.
A simple 'for loop' to count the non-null elements.
You travers through the array until the end is reached or the index is found and return the element at that index, null otherwise.
Since the array is sorted, binary search is preferred as its time complexity is O(logn).
Without compression, they become sparse in both time and space, also if random access is more common than sequential access, then they have to be compressed to byte/word array.
Because bit arrays are compact, they outperform many other data structures.
This is a non-generic way of creating an ArrayList.
trace of a matrix is the sum of the principal diagonal elements.
The first part stores the items of the dynamic array and the second part is reserved for new allocations.