3

"take as input.."

I have no idea what that means..

for example, I extracted a sentence from Google by searching, such as

"Describe an algorithm that takes as input a list of n integers".

What is the meaning of the sentence?

2

In writing that sentence, I assume that you are a programmer. To 'take as input' means to accept it into your algorithm.

In C, you might express this notion as

int algorithm(int arrayAsInput[])

{

. . .

return output;

}

| improve this answer | |
1

It means that is the nature of the data that goes into the algorithm.

If the algorithm were a function expressable as f(x1, x2,.....xn), it would be the set of numbers x1 through xn, which is also called the "argument" of that function.

| improve this answer | |
1

"Describe an algorithm that takes as input a list of n integers".

The sentence can be re-written as:

"Describe an algorithm. This algorithm needs to accept input. That input is a list of n integers."

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.