GATE Mock Test 3 and 4 - Programming, Data Structures, and Algorithms

Module - 4 Database Management and Warehousing
GATE Mock Test 3 and 4 - Programming, Data Structures, and Algorithms

1. Who founded Python?

  1. Alexander G. Bell
  2. Vincent Van Gogh
  3. Leonardo da Vinci
  4. Guido van Rossum


d. The idea of Python was conceived by Guido van Rossum in the later 1980s.

2. What is the type of programming language supported by Python?

  1. Object-oriented
  2. Functional programming
  3. Structured programming
  4. All of the above


d. Python is an interpreted programming language, supporting object-oriented, structured, and functional programming.

3. Which among the following is the queue data structure’s applications?

  1. When among the many or multiple users, a resource is shared.
  2. Balancing of the load.
  3. When the transferring of the data is asynchronous
  4. All of the above


4 All the above as all these features are the applications of queue type of data structure

4. What is the time complexity of finding an element in a Python list using the **in** operator?

  1. O(n)
  2. O(log n)
  3. O(1)
  4. O(n^2)


A. O(n)

Explanation: The **in** operator in Python performs a linear search in a list, resulting in a time complexity of O(n) in the worst case.

5. Which sorting algorithm has the best average-case time complexity in Python?

  1. Quick Sort
  2. Merge Sort
  3. Bubble Sort
  4. Insertion Sort


A. Quick Sort

Explanation: Quick Sort has an average-case time complexity of O(n log n), which makes it more efficient on average compared to the other sorting algorithms listed.

6. What is the worst-case time complexity of the binary search algorithm in a sorted list of size n?

  1. O(log n)
  2. O(n)
  3. O(1)
  4. O(n log n)


A. O(log n)

Explanation: Binary search has a worst-case time complexity of O(log n) because it divides the search space in half with each comparison.

7. Which algorithm is used to find the shortest path in a weighted directed graph with non-negative weights?

  1. Depth-First Search (DFS)
  2. Breadth-First Search (BFS)
  3. Dijkstra's algorithm
  4. Kruskal's algorithm


C. Dijkstra's algorithm

Explanation: Dijkstra's algorithm is used to find the shortest path in a weighted graph with non-negative weights.

8. Which database term is used to describe the rules that govern the relationships between tables in a relational database?

  1. Schema
  2. Index
  3. Query
  4. Constraints


D. Constraints

Explanation: Constraints in a relational database define rules and relationships between tables, such as primary keys, foreign keys, and unique constraints.

9. Which type of join returns only the rows that have matching values in both tables being joined?




Explanation: INNER JOIN returns only the rows with matching values in both tables.

10. In a relational database, what does ACID stand for?

  1. Atomicity, Consistency, Isolation, Durability
  2. Association, Concurrency, Isolation, Dependency
  3. Atomicity, Concurrency, Isolation, Dependency
  4. Association, Consistency, Isolation, Durability


A. Atomicity, Consistency, Isolation, Durability

Explanation: ACID stands for Atomicity, Consistency, Isolation, and Durability, which are properties that ensure the reliability of database transactions.

Recommended Courses
Certification in Full Stack Data Science and AI
20,000 people are doing this course
Become a job-ready Data Science professional in 30 weeks. Join the largest tech community in India. Pay only after you get a job above 5 LPA.
Masters Program in Data Science and Artificial Intelligence
20,000 people are doing this course
Join India's best Masters program in Data Science and Artificial Intelligence. Get the best jobs in top tech companies. Accredited by ECTS and globally recognised in EU, US, Canada and 60+ countries.

AlmaBetter’s curriculum is the best curriculum available online. AlmaBetter’s program is engaging, comprehensive, and student-centered. If you are honestly interested in Data Science, you cannot ask for a better platform than AlmaBetter.

Kamya Malhotra
Statistical Analyst
Fast forward your career in tech with AlmaBetter
Explore Courses

Vikash SrivastavaCo-founder & CPTO AlmaBetter

Vikas CTO

Related Tutorials to watch

view Allview-all

Top Articles toRead

view Allview-all
Made with heartin Bengaluru, India
  • Official Address
  • 4th floor, 133/2, Janardhan Towers, Residency Road, Bengaluru, Karnataka, 560025
  • Communication Address
  • 4th floor, 315 Work Avenue, Siddhivinayak Tower, 152, 1st Cross Rd., 1st Block, Koramangala, Bengaluru, Karnataka, 560034
  • Follow Us
  • facebookinstagramlinkedintwitteryoutubetelegram

© 2024 AlmaBetter