75.
What is the relation between Sparsity and Density of a matrix?

78.
Which of the following can be called a parallel array implementation?

firstName  = ['Joe','Bob','Frank','Hans']
lastName   = ['Smith','Seger','Sinatra','Schultze']
heightInCM = [169,158,201,199]
 
for i in xrange(len(firstName)):
    print "Name:",firstName[i], lastName[i]
    print "Height in CM:,",heightInCM[i]

firstName  = ['Joe','Bob','Frank','Hans']
lastName   = ['Smith','Seger']
heightInCM = [169,158]

for i in xrange(len(firstName)):
    print "Name:",firstName[i], lastName[i]
    print "Height in CM:,",heightInCM[i]

firstName  = ['Joe','Bob']
lastName   = ['Smith','Seger','Sinatra','Schultze']
heightInCM = [169,158]

for i in xrange(len(firstName)):
    print "Name:",firstName[i], lastName[i]
    print "Height in CM:,",heightInCM[i]

firstName  = ['Joe','Bob']
lastName   = ['Smith','Seger' ,'Schultze']
heightInCM = [169,158]
 
for i in xrange(len(firstName)):
    print "Name:",firstName[i], lastName[i]
    print "Height in CM:,",heightInCM[i]

80.
What will be the time complexity of the following code?
#include <bits/stdc++.h> 
using namespace std; 
void func(int arr[], int left, int right) 
{ 
    	while (left < right) 
	{ 
		int temp = arr[left]; 
		arr[left] = arr[right]; 
		arr[right] = temp; 
		left++; 
		right--; 
	} 
 
}	 
 
void printArray(int arr[], int size) 
{ 
    for (int i = 0; i < size; i++) 
    cout << arr[i] << " "; 
} 
 
int main() 
{ 
	int arr[] = {1,4,3,5}; 
	int n = sizeof(arr) / sizeof(arr[0]); 
	func(arr, 0, n-1); 
	printArray(arr, n); 
	return 0; 
}

Read More Section(Arrays in Data Structures)

Each Section contains maximum 100 MCQs question on Arrays in Data Structures. To get more questions visit other sections.