1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aneli [31]
3 years ago
14

Use the STL class vector to write a C function that returns true if there are two elements of the vector for which their product

is odd, and returns false otherwise. Provide a formula on the number of scalar multiplications in terms of n, the size of the vector, to solve the problem in the best and worst cases. Describe the situations of getting the best and worst cases, give the samples of the input at each case and check if your formula works. What is the classification of the algorithm in the best and worst cases in terms of the Big-O notation

Computers and Technology
1 answer:
Tema [17]3 years ago
7 0

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).

You might be interested in
The hardware and software that must be implemented to support the applications that the primary activities use are a part of the
Contact [7]
The answer is infrastructure
7 0
2 years ago
What is it called when there are an equal number of characters on either side of the horizontal center of the page?
Naddika [18.5K]

Answer: the term is known as Align Justified

Explanation:

In typesetting and page layout, alignment or range is the setting of text flow or image placement relative to a page, column, table cell, or tab. The type alignment setting is sometimes referred to as text alignment, text justification, or type justification.

5 0
2 years ago
You are a networking consultant who has been asked to penetration test the network of a small business. you located a target wir
cluponka [151]
<span> In a network that uses WPA2-PSK encryption you can bypass the encryption by using the weakness in the WPA2-PSK system and that is the following:the encrypted password is shared in what is known as the 4-way handshake. </span> When a client authenticates to the access point, the client and the AP go through a 4-step process of authentication.
8 0
3 years ago
What is an electronic medical record
Airida [17]
EGC . medical research science
3 0
3 years ago
Describe what happens in your browser as soon as you hit enter after writing a URL in the address bar.
Arlecino [84]

The URL is translated to an IP address, using a domain name server on the Internet. The browser then sends a request to the web server at that IP address. The server replies by sending the file, usually a web page to your IP address. The browser takes in that file, then delivers it into what you see on your screen in your browser.

3 0
3 years ago
Other questions:
  • Array elements must be ________ before a binary search can be performed.
    8·1 answer
  • In Excel, what happens to the cell contents when you click and drag a cell into multiple cells?
    14·1 answer
  • ____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
    15·1 answer
  • Write an application that instantiates five Recording objects and prompts the user for values for the data fields. Then prompt t
    13·1 answer
  • Computer A has an overall CPI of 1.3 and can be run at a clock rate of 600 MHz. Computer B has a CPI of 2.5 and can be run at a
    6·1 answer
  • What is single user operating system? Write two examples.​
    12·2 answers
  • BRAINLIEST!!! 20 PNTS!!!! HELPP!!!
    12·1 answer
  • (25 POINTS) Some applications work on all devices while others work on some devices. True or False?
    13·1 answer
  • A mysql prompt has been opened for you. Using the college database, complete the following tasks (use either a single-line or a
    7·1 answer
  • What is the most common type of storage device for transferring files from one computer to another?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!