CS502 Assignment 1 Spring 2021
Assignment No. 01 CS502 Fundamentals of Algorithms 
Total Marks: 20 Due Date: 19052021 

Instructions Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit if: · The assignment is submitted after due date. · The submitted assignment does not open or file corrupt. · The assignment is full or partially copied from (other student or ditto copy from handouts or internet). · Student ID is not mentioned in the assignment File or name of file is other than student ID. · The assignment is not submitted in .doc or .docx format. Uploading instructionsYour submission must include:
ObjectiveThe objective of this assignment is · To give basic knowledge and understanding of Algorithms. · To be able to design simple algorithms. · To be able to understand and calculate the complexity of algorithms. Note: Your answer must follow the below given specifications. · Font style: “Times New Roman” · Font color: “Black” · Font size: “12” · Bold for heading only. · Font in Italic is not allowed at all. · No formatting or bullets are allowed to use. · Your answer should be precise and to the point, avoid irrelevant detail.
Lectures Covered: This assignment covers Lecture # 01  08 Deadline Your assignment must be uploaded/submitted on or before 19052021.
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:
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."<<endl; cin>>arr[x]; } for(x=0;x<5;x++) { y=0; for(j=2; j<arr[x];j++) { z=arr[x]%j; if(z==0) { y=1; break; } } if(y==0) cout<<arr[x]<<endl; } }
For any query about the assignment, contact at [email protected]
GOOD LUCK 
CS502 Assignment 1 Spring 2021
CS502 solution idea:
Download attachment for CS502 assignment 1 Spring 2021 solution file.
Students kindly share assignment files in relevant subject timely for discussion/solution.
or directly share with us " Click here"
QueryVU Telegram Groups subject wise Join Now
QueryVU WhatsApp groups subject wise Join Now

CS502 Assignment 2 Solution Spring 2021 Fundamentals of Algorithms 100% Correct Solution
3 weeks ago

CS502 Assignment 3 Fall 2020
5 months ago

CS502 Assignment 2 Fall 2020
6 months ago

CS502 Assignment 1 Fall 2020
7 months ago

CS502 Assignment 3 Spring 2020
11 months ago
Latest Post: ECO704 Grand Quiz Spring 2021 Our newest member: tahirshah944 Recent Posts Unread Posts
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed