Answer:
Code is provided in the attachment form
Explanation:
Vector Multiplication code:
Vector_multiplication.c file contains C code.
See attachment no 1 attached below
Classification of Algorithm: For creating elements in vector c of size n, number of scalar multiplications is equal to n. The size of original two vectors scales directly with the number of operations. Hence, it is classified as O(n).
Answer:
Option B is the correct answer for the above question.
Explanation:
- The data warehouse is a collection of large data or a database that includes historical and operational or current data. This database can be used to make the decisions for the prospects of the organization.
- The above question asked about to select the database which can collect the historical and operational data from various source. That type of database is a data warehouse that is described above. Hence option B is correct while the other is not because:-
- Option a states about data model which is used to define the database structure.
- Option c states about the relational database which is used to collect only current data.
- Option d states about the DBMS which is used to manage the relational database.
Answer:
I would think it would be D
Explanation:
that's basically what it said in the passage
Answer:
public static void init(int[] arr, int n) {
if (n==0)
arr[0] = 0;
else {
arr[n-1] = n - 1;
init(arr, n-1);
}
}
Explanation:
Create a method called init that takes two parameters, an array and the number of elements in the array
When n reaches 0, set the first element to 0 (This is a base for our recursive method)
Otherwise, set the element in index i to i
Call the init inside the init, this is the recursion part, with same array but decrease the number of elements by 1 (We decrease the number of element by 1 in each time so that it goes through all the elements in the array)