Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 577 Bytes

Ex_1_4_06.md

File metadata and controls

35 lines (20 loc) · 577 Bytes
title date draft tags categories
Algorithm4 Java Solution 1.4.06
2019-08-06 15:54:00 +0800
false
JAVA
TECH
archives

1.4.06

Problem:

Give the order of growth (as a function of N ) of the running times of each of the following code fragments

2019-08-14-007

2019-08-14-008

Solution:

a $N+N/2+N/4+...=~2N$ linear

b $1+2+4+8+...+N = ~2N$ linear

c $N(1+1+1+...+1) = ~NlgN$ linearithmic

Reference: