Quizzma Latest Questions

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer. An algorithm that accesses each element in the list twice An algorithm that accesses each element in the list n times An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list Which of the algorithms run in reasonable time?

Anonymous

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer.
An algorithm that accesses each element in the list twice
An algorithm that accesses each element in the list n times
An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list
Which of the algorithms run in reasonable time?




Related Questions

Leave an answer

Leave an answer

1 Answer