# Deloitte USI Core CS Questions with Answers

8 previously-asked core cs questions from Deloitte USI's hiring process, each with the correct answer and a worked explanation. Written against the company's actual test pattern.

_Source: Astra (https://useastra.in). Updated 2026-09-05._

### 1. Which SQL clause is used to sort the result set?

A. WHERE
B. GROUP BY
C. ORDER BY
D. HAVING

**Answer:** ORDER BY

**Explanation:** ORDER BY sorts the result rows by one or more columns, ascending or descending.

### 2. Which SQL aggregate function returns the number of rows?

A. SUM
B. COUNT
C. AVG
D. MAX

**Answer:** COUNT

**Explanation:** COUNT returns the number of rows (or non-null values in a column).

### 3. Which OOP relationship represents a has-a association?

A. Inheritance
B. Composition
C. Polymorphism
D. Overloading

**Answer:** Composition

**Explanation:** Composition models a has-a relationship, where one object contains another; inheritance models is-a.

### 4. Which ACID property guarantees that committed data survives a system failure?

A. Atomicity
B. Consistency
C. Isolation
D. Durability

**Answer:** Durability

**Explanation:** Durability ensures that once a transaction commits, its changes persist even after a crash.

### 5. Which data structure provides average O(1) lookup by key?

A. Array
B. Linked list
C. Hash table
D. Stack

**Answer:** Hash table

**Explanation:** A hash table maps keys to buckets, giving average constant time lookup, insertion, and deletion.

### 6. A boolean expression evaluates to which of the following?

A. true or false
B. an integer only
C. a string
D. null

**Answer:** true or false

**Explanation:** A boolean expression yields a logical value, either true or false.

### 7. Which SQL join produces a Cartesian product of two tables?

A. Inner join
B. Left join
C. Cross join
D. Self join

**Answer:** Cross join

**Explanation:** A cross join pairs every row of the first table with every row of the second, giving the Cartesian product.

### 8. What is the average time complexity of searching in a balanced binary search tree?

A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)

**Answer:** O(log n)

**Explanation:** A balanced BST keeps its height at about log n, so search takes O(log n).

More Deloitte USI preparation, including the full recruitment process: https://useastra.in/campus/deloitte
