- What is displayed in step 4 if a =4, b=5, c=7 in thepseudocode
Step 1: Start
Step 2: Declare variables a, b andc.
Step 3: Read variables a, b, c
Step 4: if a > b
If a > c
Display a
Else
Display c
Else
If b > c
Display b
Else
Display c
Answer: 4, 7, a, c
- What is the time complexity of fun() given the pseudocodebelow?
Function fun(int n) {
For (int i=1; i<=n; i++) {
Int j = n;
While(j >= 1) {
J = j/2 // assumesinteger division with no fraction
OR
OR