Skip to content

Ola Online Assessment Questions - OA Format, DSA Problems & Preparation 2025

Complete guide to Ola online assessment (OA) format, coding questions, DSA problems, and preparation strategy. Practice Ola OA questions with solutions and learn how to clear Ola online assessment.

Ola online assessment (OA) is the first round of Ola’s placement process. This guide covers the Ola online assessment format, question types, preparation strategy, and tips to clear the OA and advance to technical interviews.

ComponentDetailsTime Allocation
PlatformHackerRank or similar coding platform-
Duration90-120 minutesTotal time
DSA Problems2-3 coding problems60-80 minutes
Debugging1-2 debugging questions20-30 minutes
LanguagesJava, C++, Python, Go-
EvaluationAll test cases must pass-
  • Problem-Solving Focus: Strong emphasis on DSA and algorithms
  • Optimal Solutions: Time and space complexity matter
  • Test Cases: All test cases must pass for qualification
  • No Partial Credit: Solutions must be complete and correct
  • Time Pressure: Efficient problem-solving under time constraints

Ola online assessment questions primarily focus on Data Structures and Algorithms:

  • Array manipulation and searching
  • String processing and pattern matching
  • Two-pointer technique
  • Sliding window problems
  • Binary tree traversals
  • Tree construction and manipulation
  • Graph algorithms (BFS, DFS)
  • Shortest path problems
  • Classic DP problems
  • Optimization problems
  • Memoization techniques
  • Greedy algorithms
  • Backtracking
  • Union-Find
  • Segment trees (rare)

Debugging questions in Ola OA test your ability to:

  • Identify bugs in given code
  • Fix logical errors
  • Correct syntax issues
  • Improve code efficiency

Sample Debugging Question:

Q: Find and fix the bug in the following code that finds the maximum element in an array:
int findMax(int[] arr) {
int max = 0;
for (int i = 0; i < arr.length; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
return max;
}

Bug: If all array elements are negative, the function returns 0 instead of the maximum negative value.

Fixed Code:

int findMax(int[] arr) {
if (arr.length == 0) return Integer.MIN_VALUE;
int max = arr[0];
for (int i = 1; i < arr.length; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
return max;
}
Q: Given an array of integers, find the maximum sum of a contiguous subarray (Kadane’s Algorithm variant).

Problem: Find the maximum sum of a contiguous subarray. Handle edge cases like all negative numbers.

Solution:

public int maxSubarraySum(int[] arr) {
if (arr.length == 0) return 0;
int maxSoFar = arr[0];
int maxEndingHere = arr[0];
for (int i = 1; i < arr.length; i++) {
maxEndingHere = Math.max(arr[i], maxEndingHere + arr[i]);
maxSoFar = Math.max(maxSoFar, maxEndingHere);
}
return maxSoFar;
}

Time Complexity: O(n) Space Complexity: O(1)

Q: Given a binary tree, find the diameter (longest path between any two nodes).

Solution:

class TreeNode {
int val;
TreeNode left, right;
}
int diameter = 0;
public int diameterOfBinaryTree(TreeNode root) {
height(root);
return diameter;
}
private int height(TreeNode node) {
if (node == null) return 0;
int leftHeight = height(node.left);
int rightHeight = height(node.right);
diameter = Math.max(diameter, leftHeight + rightHeight);
return 1 + Math.max(leftHeight, rightHeight);
}

Time Complexity: O(n) Space Complexity: O(h) where h is height

Q: Given a graph, find if there is a path between two nodes (BFS/DFS).

Solution (BFS):

public boolean hasPath(int[][] graph, int start, int end) {
if (start == end) return true;
Queue<Integer> queue = new LinkedList<>();
boolean[] visited = new boolean[graph.length];
queue.offer(start);
visited[start] = true;
while (!queue.isEmpty()) {
int node = queue.poll();
for (int neighbor : graph[node]) {
if (neighbor == end) return true;
if (!visited[neighbor]) {
visited[neighbor] = true;
queue.offer(neighbor);
}
}
}
return false;
}

Arrays & Strings

Practice array manipulation, two-pointer technique, sliding window, and string processing problems. Solve 30+ problems.

Trees & Graphs

Master tree traversals, tree construction, graph algorithms (BFS, DFS), and shortest path problems. Solve 25+ problems.

Dynamic Programming

Practice classic DP problems, optimization problems, and memoization techniques. Solve 20+ DP problems.

  • LeetCode: Solve medium and hard problems
  • HackerRank: Practice on the same platform as Ola OA
  • Codeforces: Improve problem-solving speed
  • GeeksforGeeks: Review DSA concepts and problems

Step 3: Solve Ola OA Previous Year Questions

Section titled “Step 3: Solve Ola OA Previous Year Questions”
  • Practice with Ola placement papers
  • Understand question patterns and difficulty
  • Focus on optimal solutions
  • Time yourself while solving
  • Simulate actual OA environment
  • Practice under time pressure
  • Improve problem-solving speed
  • Identify weak areas
  • Understand ride matching algorithms
  • Learn about payment systems
  • Review scalability concepts
  • Study Ola’s business model
  1. Read Problems Carefully: Understand requirements and constraints
  2. Plan Before Coding: Outline approach and algorithm
  3. Handle Edge Cases: Consider empty arrays, single elements, etc.
  4. Test Your Code: Verify with sample inputs before submitting
  5. Optimize Solutions: Aim for optimal time/space complexity
  6. Manage Time: Don’t spend too long on one problem
  1. Clean Code: Write readable, well-structured code
  2. Variable Names: Use descriptive names
  3. Comments: Add brief comments for complex logic
  4. Error Handling: Handle edge cases and errors
  5. Test Cases: Verify with multiple test cases
  • ❌ Not reading problem constraints carefully
  • ❌ Submitting without testing code
  • ❌ Ignoring edge cases
  • ❌ Inefficient solutions (wrong complexity)
  • ❌ Spending too much time on one problem
  • ❌ Not managing time effectively

Ola Placement Papers

Practice with Ola placement papers containing OA questions from previous years.


View Papers →

Ola Preparation Guide

Complete preparation guide for Ola placement including OA strategy.


View Guide →

LeetCode Practice

Practice DSA problems on LeetCode. Focus on medium and hard problems.


Practice Now →


Ready to prepare for Ola online assessment? Master DSA fundamentals, practice 100+ problems, and take mock assessments to improve your problem-solving skills and clear the OA.

Pro Tip: Practice solving 2-3 medium/hard DSA problems daily under time constraints. Focus on optimal solutions and ensure all test cases pass.

Last updated: January 2025