Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

PAT Practice Test: Program Aptitude Questions

Quick, free PAT mock test to check your problem-solving. Instant results.

Editorial: Review CompletedCreated By: Kason CadeUpdated Aug 25, 2025
Difficulty: Moderate
2-5mins
Learning OutcomesCheat Sheet
Paper art illustration of PAT practice quiz title with notebook, pencil, and geometric shapes on golden yellow background.

This PAT practice test helps you check core problem-solving skills with timed, exam-style questions. Review answers as you go and see where to improve, and get instant feedback. For more drills, try our quantitative aptitude test and mathematical reasoning questions, or build logic with a computer programming quiz.

Which data structure provides First-In, First-Out (FIFO) behavior?
Set
Stack
Queue
Tree
undefined
What is the time complexity of binary search on a sorted array in the worst case?
O(n log n)
O(log n)
O(1)
O(n)
undefined
In pseudocode, what is the value of sum after this runs: sum=0; for i from 1 to 5 do sum=sum+i; endfor
5
10
20
15
undefined
Which of the following is a stable sorting algorithm?
Merge sort
Heap sort
Quick sort (naive)
Selection sort
undefined
A variable declared inside a function is typically what kind of variable?
Static by default
Global
Public
Local
undefined
Which data structure is best for checking membership in average O(1) time?
Array (unsorted)
Linked list
Binary search tree (unbalanced)
Hash table
undefined
Given the set S = {a, b, c}, how many subsets does S have?
3
6
7
8
undefined
In a directed acyclic graph (DAG), which operation is well-defined and commonly used?
Eulerian circuit construction
Topological sorting
Cycle detection returning at least one cycle
Self-loop minimization
undefined
True or False: A function with side effects is referentially transparent.
False
True
undefined
What is the worst-case time complexity of inserting an element into a balanced binary search tree?
O(n)
O(1)
O(n log n)
O(log n)
undefined
What is the space complexity of in-place quicksort (average case) ignoring recursion stack overhead?
O(n log n) auxiliary
O(1) auxiliary
O(log n) auxiliary
O(n) auxiliary
undefined
Given an undirected connected graph with n nodes and n edges, which statement is true?
It is bipartite
It is always a tree
It is complete
It contains exactly one cycle
undefined
You need to choose 3 committee members from 8 candidates. How many distinct committees are possible?
336
56
24
512
undefined
True or False: For any two events A and B, P(A and B) = P(A)P(B).
False
True
undefined
Which algorithmic technique divides a problem into subproblems, solves them independently, and combines the results, with overlapping subproblems and optimal substructure?
Divide and conquer
Dynamic programming
Greedy
Backtracking
undefined
Which of the following operations increases entropy in a pseudo-random number generator design?
Linear recurrence without mixing
Collecting unpredictable environmental noise
Deterministic seeding with a fixed value
Using a short, repeated seed
undefined
Consider the function f defined on nonnegative integers: f(0)=1, f(1)=1, and f(n)=f(n-1)+f(n-2) for n>=2. What is f(6)?
8
5
21
13
undefined
True or False: NP-complete problems are those that are in NP and to which every problem in NP can be reduced in polynomial time.
False
True
undefined
Which statement about A* search is correct when the heuristic is admissible and consistent?
A* finds an optimal path
A* always explores all nodes
A* ignores closed lists
A* may not terminate
undefined
What is the determinant of a 2x2 matrix [[a, b], [c, d]]?
a+b+c+d
ad-bc
ac-bd
ab+cd
undefined
0

Study Outcomes

  1. Understand PAT Question Formats -

    Identify the key components and structures of pat questions to approach each question type with confidence. Gain insight into how logic, coding, and problem-solving elements are presented in real exam scenarios.

  2. Analyze Logical Reasoning Scenarios -

    Break down logic-based pat practice questions to uncover underlying patterns and develop systematic solution methods.

  3. Apply Coding Skills Effectively -

    Translate programming concepts into code-derived answers for real exam-style pat practice questions.

  4. Solve Complex Problem-Solving Challenges -

    Implement strategic problem-solving techniques to tackle multi-step challenges within timed tests.

  5. Evaluate Performance Metrics -

    Interpret quiz results and feedback to pinpoint strengths and weaknesses and guide further pat practice.

  6. Optimize Test-Taking Strategies -

    Develop time-management and answer-selection tactics to enhance accuracy and efficiency in the program aptitude test.

Cheat Sheet

  1. Time Complexity and Big O Basics -

    Understanding time complexity is crucial for pat questions, as it helps you predict how your code scales under different inputs. Memorize the standard classes - O(1), O(log n), O(n), O(n log n), and O(n²) - and use the mnemonic "1-LOG-LINEAR-LOG-LINEAR-QUAD" to recall them in ascending order. This foundation, endorsed by sources like MIT OpenCourseWare, ensures you can compare solutions quickly during your pat practice.

  2. Divide and Conquer Paradigm -

    Many pat practice questions rely on divide and conquer strategies, which break problems into smaller subproblems (e.g., merge sort, binary search) and combine results efficiently. The recurrence T(n)=aT(n/b)+f(n) (from CLRS) helps analyze performance; for binary search, T(n)=T(n/2)+O(1) yields O(log n). Visualizing recursion trees can cement this concept and speed up your algorithm design.

  3. Dynamic Programming Essentials -

    Dynamic programming addresses overlapping subproblems and optimal substructure by storing intermediate results in tables or memo arrays. A classic example is computing Fibonacci numbers in O(n) time via DP: fib[i]=fib[i - 1]+fib[i - 2]. Remember the phrase "Store to Score" to recall that saving sub-results leads to dramatic speedups on pat questions involving sequences or knapsack variants.

  4. Core Data Structures Mastery -

    Efficiently using arrays, stacks, queues, trees, and graphs is a staple of quality pat practice questions. Practice traversal patterns - like in-order for BSTs and BFS/DFS for graphs - to quickly analyze and manipulate structures. Trusted university tutorials (Stanford, UC Berkeley) offer clear code examples that you can adapt under exam time pressure.

  5. Bit Manipulation Tricks -

    Bitwise operations often appear in pat questions for their constant-time performance. Key tricks include checking powers of two with (n & (n - 1))==0 and isolating the lowest set bit via n & ( - n). These hacks, highlighted in resources like Hacker's Delight, can turn tricky arithmetic tasks into one-line solutions.

Powered by: Quiz Maker