Summary
This post details an Online Assessment for an Application Engineer role at IDFC Bank, which included aptitude, technical MCQs, and two coding problems, ultimately resulting in not being selected.
Full Experience
OA Round
Aptitude & Reasoning Time Allotted: ~20 minutes Number of Questions: ~15 MCQs Topics Covered: Quantitative Maths, Logical Thinking
Technical MCQs Time Allotted: ~25 minutes Number of Questions: ~20 MCQs Topics Covered: SQL, Flowcharts, DBMS, OOPs, OS, Networking
Coding Round Time Allotted: ~45 minutes Number of Questions: 2 Problems Topics Covered: Easy to Medium Data Structures & Algorithms (dp+ Array)
Question 1: Find Consecutive Integer Sequences That Sum to N Problem: Given a positive integer n, find all sequences of consecutive positive integers whose sum equals n.
Each sequence must have at least two numbers.
Also print the total count including the single number sequence (just n).
public class ConsecutiveSumFromX {
public static void main(String[] args) {
int n = 15;
int count = 0;
for(int start = 1; start <= n / 2; start++) {
int sum = 0, curr = start;
while (sum < n) {
sum += curr++;
}
if (sum == n) {
count++;
System.out.print("Sequence " + count + ": ");
for (int i = start; i < curr; i++) {
System.out.print(i + (i == curr - 1 ? "\n" : " + "));
}
}
}
count++;
System.out.println("Sequence " + count + ": " + n);
System.out.println("Total sequences: " + count);
}
}
Question 2: Maximum Profit from Selling Movie Tickets in Bundles Problem: Given an array prices where prices[i] is the price of selling (i+1) tickets as a bundle. Find the maximum profit when selling exactly m tickets in any combination of bundles.
public class TicketProfitMaximizer {
public static int maxProfit(int[] prices, int m) {
int[] dp = new int[m + 1];
for (int i = 1; i <= m; i++) {
int maxVal = Integer.MIN_VALUE;
for (int j = 1; j <= i; j++) {
maxVal = Math.max(maxVal, prices[j - 1] + dp[i - j]);
}
dp[i] = maxVal;
}
return dp[m];
}
public static void main(String[] args) {
int[] prices = {10, 70, 30};
int m = 3;
System.out.println("Max Profit for " + m + " tickets = " + maxProfit(prices, m));
}
}
Not Selected
Interview Questions (2)
Given a positive integer n, find all sequences of consecutive positive integers whose sum equals n. Each sequence must have at least two numbers. Also print the total count including the single number sequence (just n).
Given an array prices where prices[i] is the price of selling (i+1) tickets as a bundle. Find the maximum profit when selling exactly m tickets in any combination of bundles.
Preparation Tips
Tip: These problems resemble classic "Consecutive Numbers Sum" and "Rod Cutting" problems. Practice similar problems on LeetCode for better preparation.