This function returns the first item in an array.
def first_item(arr): return arr
How does the runtime increase w.r.t. input size?
It does not.
What is the time complexity?
: indexing an array is a constant time operation.
This workbook was created by Jad and Rayan Slim. Feel free to explore some of their courses:
The Complete Java Development Bootcamp
The Complete Spring Boot Development Bootcamp – Become a Java Web Developer
There are no written reviews yet.