Skip to content

Adobe Coding Questions - DSA Problems & Solutions

Practice Adobe placement paper coding questions with detailed solutions. Access Adobe OA coding problems in Java, C++, Python.

This page contains Adobe coding questions from Adobe OA placement papers with detailed solutions.

Adobe OA Coding Section:

  • Problems: 2-3 coding problems
  • Time: 90 minutes
  • Languages: C++, Java, Python
Q1: Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].

Solution (Java):

public int[] productExceptSelf(int[] nums) {
int n = nums.length;
int[] result = new int[n];
result[0] = 1;
for (int i = 1; i < n; i++) {
result[i] = result[i-1] * nums[i-1];
}
int right = 1;
for (int i = n-1; i >= 0; i--) {
result[i] *= right;
right *= nums[i];
}
return result;
}

Time Complexity: O(n)


Practice Adobe coding questions regularly!