0% found this document useful (0 votes)
38 views1 page

Employeedetails (Empid, Fullname, Managerid, Dateofjoining) Employeesalary (Empid, Project, Salary)

The document provides instructions for an exam on data structures and databases that is 1 hour and 15 minutes long. It specifies to write on A4 sheets of paper with login ID and phone number, and to email the scanned answer sheet as a PDF file to the given email address by the deadline. The exam contains 7 questions testing various data structure and database concepts such as time complexity, operations on data structures, binary trees, stacks, databases, SQL queries, and set theory.

Uploaded by

Sakib Muhaimin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Employeedetails (Empid, Fullname, Managerid, Dateofjoining) Employeesalary (Empid, Project, Salary)

The document provides instructions for an exam on data structures and databases that is 1 hour and 15 minutes long. It specifies to write on A4 sheets of paper with login ID and phone number, and to email the scanned answer sheet as a PDF file to the given email address by the deadline. The exam contains 7 questions testing various data structure and database concepts such as time complexity, operations on data structures, binary trees, stacks, databases, SQL queries, and set theory.

Uploaded by

Sakib Muhaimin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Exam-1 (Data Structure & Database)

Full Marks: 100


Time: 1 hour 15 min
িনয়মাবলী :
১. A4 size খাতায় পরী া িদেবন । খাতার উপর লিগন আইিড,!ফান নং িলখেবন(!য&ট িদেয় !র(জে*শান কেরেছন)
২.0থেম ঘিড় ধের ১ ঘ5ায় পরী া !শষ করেবন । সৎ থাকেবন। !দেখ িলখেবন না।
৩.তারপর !মাবাইল ছিব ত: েল !স;েলা pdf বানােবন। িল?ঃ smallpdf.com/jpg-to-pdf
৪.আমার ইেমইল এ পাঠােবন । সাবেজN এর ঘের লিগন আইিড, আর !ফান নং িলেখ পাঠােবন।
Email: [email protected]
Answer all the questions

1. a. Find the time complexity of the following code snippet. 2+2=4


i) for(i=0;i<=n;i++) ii) for(i=0;i<=n;i++)
{ {
Statement; for(j=0;j<=n;j++)
} {
Statement;
}
}
b. Calculate linear search and binary search time complexity. 3+3=6
2. a. What are the operations performed on a data structure? What are the advantages of linked 10
list over array?
b. Draw a Binary min heap that results from inserting 9, 3, 7, 1, 8, 2, 6, 5, 4 in that order 10
into an initially empty heap. Show each insertion step separately.
3. a. Draw a binary Tree for the expression: A*B – (C+D) *(P/Q) 10
b. Describe the three level of data abstraction. Explain super and candidate key. 6+4=10
4. a. Write an algorithm to create a stack. If stack is overflow mention it. 5
b. Describe ACID properties of Database. How indexing is created. What is the impact on 15
indexing over database?
5. Consider the following table: 3+3+4=10
EmployeeDetails(EmpId, FullName, ManagerId, DateOfJoining)
EmployeeSalary(EmpId, Project, Salary)
a.Write a SQL query to fetch the count of employees working in project 'P1'.
b.Write a SQL query to fetch employee names having salary greater than or equal to 5000
an less than or equal 10000.
c.Write a SQL query to fetch project-wise count of employees sorted by project's count in
descending order.

6. The difference between the value of a number increased by 12.5% and the value of the 10
original number decreased by 25% is 30. What is the original number?
7. Consider that A and B are two sets. If AxB={(1,0),(2,1),(3,-1),(4,3)}, then find A and B. 10
Also prove that AxB not equal BxA.

You might also like