Question
Question No 01: (Marks: 10) Suppose that one of the largest commercial bank branch in UAE has recently experienced a significant distress due to covid
Question No 01: (Marks: 10)
Suppose that one of the largest commercial bank branch in UAE has recently experienced a significant distress due to covid 19. A huge No. of account holders withdraws the payment from the bank. Now manager want to check the total number of accounts those have less than 1000$.
You are required perform the following task:
- Write only Pseudocode to check the total number of accounts, who have less than 1000$ using array list.
- After writing Pseudocode calculate the worst-case time complexity T(n).
Question No 02: (Marks: 10)
A prime number is a number that can only be divided by itself and 1. Using the following code, we can check whether the number is prime or not. Your task is to find the time complexity of the following code with respect to worst case.
int arr[5], j, x , y, z;
for(x=0; x<5; x++)
{
cout<<"Enter the no."< cin>>arr[x]; } for(x=0;x<5;x++) { y=0; for(j=2; j { z=arr[x]%j; if(z==0) { y=1; break; } } if(y==0) cout< } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started