Đàm Ngọc Lan
New member
What is the functionality of the following piece of code?
A. Store the element in the specified position
B. Get the element from the specified position
C. Alter the element in the specified position
D. Removes the element from the specified position
Code:
public Object function(int row_index, int col_index)
{
if (row_index < 0 || col_index > N)
{
System.out.println("column index out of bounds");
return;
}
return (sparse_array[row_index].fetch(col_index));
}
B. Get the element from the specified position
C. Alter the element in the specified position
D. Removes the element from the specified position