Arrays & Strings
Practice array manipulation, two-pointer technique, sliding window, and string processing problems. Solve 30+ problems.
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.
| Component | Details | Time Allocation |
|---|---|---|
| Platform | HackerRank or similar coding platform | - |
| Duration | 90-120 minutes | Total time |
| DSA Problems | 2-3 coding problems | 60-80 minutes |
| Debugging | 1-2 debugging questions | 20-30 minutes |
| Languages | Java, C++, Python, Go | - |
| Evaluation | All test cases must pass | - |
Ola online assessment questions primarily focus on Data Structures and Algorithms:
Debugging questions in Ola OA test your ability to:
Sample Debugging Question:
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;}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)
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
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.
Ola Placement Papers
Ola Preparation Guide
LeetCode Practice
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