Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.



n = 5, k = 2 and arr[] = {6, 5, 4, 8, 7}
The array elements in sorted order are [4, 5, 6, 7, 8]. The ‘2-nd’ smallest element in the array is 5, so the answer is 5.
1. Don’t print anything. Return the value of ‘k-th’ smallest element.
2. ‘k’ is a positive integer and not greater than the size of the array.
3. The array ‘arr’ is unsorted, and all the elements of the array are distinct.
Follow the given steps to solve the problem:
Sort the input array in the increasing order.
Return the element at the K-1 index (0 – Based indexing) in the sorted array.



1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Use two loops. The Outer loop iterates through all the element and inner loop finds out whether the current index picked by the outer loop is equilibrium index or not.



1. The output array should have the same ordering of elements as the original arrays.
2. Even if a particular element appears more than once in each of the three arrays, it should still be present only once in the output array.
3. If there are no common elements in the arrays, return an empty array.
Consider the three arrays A = [ 2, 3, 4, 7 ] , B = [ 0, 0, 3, 5 ] , C = [ 1, 3, 8, 9 ]
The output array should be [ 3 ] as 3 is the only element which is present in all the three arrays.
A Better Solution is to use Binary Search.
1) Iterate over all elements of A[].
a) Binary search for element just smaller than or equal to in B[] and C[], and note the difference.
2) Repeat step 1 for B[] and C[].
3) Return overall minimum.
Time complexity of this solution is O(nLogn).



The answer could be very large, output answer %(10 ^ 9 + 7).



Up: (x, y) -> (x - 1, y)
Left: (x, y) -> (x, y - 1)
Down: (x, y) -> (x + 1, y)
Right: (x, y) -> (x, y + 1)
consider the binary matrix below. If source = (0, 0) and destination = (3, 4), the shortest path from source to destination has length 11.

Start from the given source cell in the matrix and explore all four possible paths.
Check if the destination is reached or not.
Explore all the paths and backtrack if destination is not reached.
And also keep track of visited cells using an array.
Valid Moves are:
left: (i, j) ——> (i, j – 1)
right: (i, j) ——> (i, j + 1)
top: (i, j) ——> (i - 1, j)
bottom: (i, j) ——> (i + 1, j )



Gcd of two numbers (X, Y) is defined as the largest integer that divides both ‘X’ and ‘Y’.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?