Question Bank & Quizzes

PREMIUM CONTENT

Access our extensive collection of questions and interactive quizzes to enhance your learning experience

Text-based Questions

What is the time complexity of a binary search algorithm?

Explain the reasoning behind the time complexity of binary search and compare it to linear search.

Answer: The time complexity of binary search is O(log n). This is because with each comparison, the algorithm eliminates half of the remaining elements. In contrast, linear search has O(n) time complexity as it may need to examine every element in the worst case.

What are the main differences between TCP and UDP?

Compare and contrast Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

Answer: TCP is connection-oriented, reliable, and ensures ordered delivery of packets. It uses flow control and error checking. UDP is connectionless, unreliable, and doesn't guarantee ordered delivery. It's faster with less overhead but doesn't provide error checking or retransmission.

What is the purpose of normalization in database design?

Explain the concept of normalization and why it's important in relational database design.

Answer: Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. It involves dividing large tables into smaller tables and defining relationships between them. The main purposes are to eliminate redundant data, ensure data dependencies make sense, and protect data integrity.

Explain the concept of recursion in programming

Define recursion and provide an example of where it might be used effectively.

Answer: Recursion is a programming technique where a function calls itself to solve a problem by breaking it down into smaller subproblems. A recursive function must have a base case (to stop recursion) and a recursive case (to call itself). Examples include traversing tree data structures, calculating factorials, or implementing algorithms like quicksort.

What is object-oriented programming?

Describe the main principles of object-oriented programming and their significance.

Answer: Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects" which contain data and methods. The four main principles are: Encapsulation (bundling data with methods that operate on that data), Inheritance (allowing new objects to take on properties of existing objects), Polymorphism (ability to present the same interface for different underlying forms), and Abstraction (hiding complex implementation details).

PDF-based Questions

Algorithms Final Exam

Comprehensive final exam covering all algorithm topics taught in CSE 301. Includes problem solving and theoretical questions.

Computer Science 2023

Discrete Mathematics Midterm

Midterm examination with questions on set theory, combinatorics, graph theory, and mathematical logic.

Mathematics 2022

Database Systems Quiz

Quiz covering SQL queries, normalization, transaction management, and indexing techniques.

Computer Science 2023

English Composition Final

Final exam testing grammar, essay writing, comprehension, and vocabulary skills.

English 2022

Computer Networks Exam

Comprehensive exam covering OSI model, TCP/IP, routing protocols, and network security.

Computer Science 2023

Interactive Quizzes

Test your knowledge and get immediate feedback

1. What is the time complexity of the bubble sort algorithm in the worst-case scenario?
A O(n)
B O(n log n)
C O(n²)
D O(1)
Incorrect! The correct answer is O(n²).
Bubble sort has a worst-case time complexity of O(n²) because it requires nested loops to compare and swap elements.
2. Which protocol is used to securely transfer files over a network?
A HTTP
B FTP
C SFTP
D TCP
Incorrect! The correct answer is SFTP.
SFTP (SSH File Transfer Protocol) provides secure file transfer, while FTP sends data in plain text. HTTP is for web pages, TCP is a transport protocol.
3. In database systems, what does ACID stand for?
A Atomicity, Consistency, Isolation, Durability
B Access, Control, Integrity, Durability
C Atomic, Consistent, Independent, Durable
D Availability, Consistency, Integrity, Durability
Incorrect! The correct answer is Atomicity, Consistency, Isolation, Durability.
ACID is a set of properties that guarantee database transactions are processed reliably: Atomicity (all or nothing), Consistency (valid state transitions), Isolation (concurrent transactions don't interfere), Durability (committed transactions persist).
4. Which data structure uses the LIFO (Last-In-First-Out) principle?
A Queue
B Stack
C Linked List
D Tree
Incorrect! The correct answer is Stack.
A stack follows the LIFO principle where the last element added is the first one to be removed. Queues follow FIFO (First-In-First-Out).
5. What is the main purpose of DNS (Domain Name System)?
A To assign IP addresses
B To encrypt network traffic
C To translate domain names to IP addresses
D To manage network routing
Incorrect! The correct answer is to translate domain names to IP addresses.
DNS translates human-readable domain names (like www.example.com) into numerical IP addresses that computers use to identify each other on the network.