AfterAcademy Tech
You are given an array arr[] with n elements. Write a program to find the contiguous subarray which has the largest product. It's a typical optimization problem.
You are given a 2D binary matrix arr[][] filled with 0's and 1's. The array contains a square of 1's. So, you need to find that square and return its area. The problem is a great example for practicing dynamic programming for technical interviews.
Given three strings S1, S2 and S3, write a program which checks whether S3 is an interleaving of S1 and S2. The problem is a typical dynamic programming problem.
Given an array of non-negative integers arr[] of length n, where each element represents the max number of steps that can be made forward from that element. You are initially positioned at the first index of the array. Write a program to return the minimum number of jumps to reach the last index of the array.
Given a non-empty array of positive integers arr[ ]. Write a program to find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
Given a Binary Search Tree such that two of the nodes of this tree have been swapped by mistake. You need to write a program that will recover this BST while also maintaining its original structure
You are given an array of integers arr where each element represents the height of a bar in a histogram. Histogram is a graphical display of data using bars of different heights. The bars are placed in the exact same sequence as given in the array. You need to find the area of the largest rectangle found in the given histogram.
This is a typical graph problem that needs a proper understanding of building a graph and traversing on it using a breadth-first search.
Given N point on a 2D plane as pair of (x, y) coordinates, Write a program to find the maximum number of point which lie on the same line. This is a famous mathemtical problem and clears the concepts of problem related with XY planes.
Given array representation of min Heap, write a program to convert it to max Heap. This problem will clear the concepts of the heap and priority queue which is a very important concept of data structures.