-
Array Values Algorithms
How many values can be held by an array with dimensions A(0:n), B(-1:n,1:m), C(-n:0,2)?
-
Calculate Primary and Secondary Diagonal
Write an algorithm that calculates all the elements of rows and columns of a square matrix and calculate the total of primary and secondary diagonal.
-
-
-
Compute Average of Two Scores
Describe an algorithm to compute the average of two scores obtained by each of the 100 students
-
Sorted Matrix
You are given a matrix. The matrix elements are such that they are sorted both horizontally and vertically. Given an element of the matrix, your job is to obtain its position in an efficient manner.Example: 10 20 30 15 35 98 48 76 110Input: 76Output: 3rd row, 2nd column.
-
Sub matrix
U are given a n*n square matrix where each element is either 0 or 1....u have to find the square submatrix with the largest length such that all the elements along the border of that square submatrix matrix is 1 ....
Ans