what is the order of n
Attachments:
Answers
Answered by
3
Explanation:
n refers to the size of the input, in your case it's the number of items in your list. O(n) means that your algorithm will take on the order of n operations to insert an item. e.g. looping through the list once (or a constant number of times such as twice or only looping through half).
Similar questions
Math,
2 months ago
Social Sciences,
2 months ago
English,
2 months ago
Physics,
4 months ago
Computer Science,
10 months ago
Math,
10 months ago
Math,
10 months ago