Implement the following algorithms and analyze its expected (average) and worst run time complexities. You should work through the functions one by one, making comments and identifying the complexity of each part of the algorithm. If you are unsure of how the algorithms scale, then try adding counter variables and incrementing them each time an operation takes place. By logging out the counters for different sizes of input you should be able to see a trend developing.
Write a program that determines if an input is even or odd. Explain its average and worst run time
Write a program that doubles every value in an array. Explain its average and worst run time