Tip 1 : Clear the core concept
Tip 2 : Give all contests in leetcode
Tip 1 : Mention the project which is done by you.
Tip 2 : Do not mention any irrelevant information. eg. achievement of 11th 12th school OR captain of my college theatre etc.
The environment was very good.
Timing is less as compared to another test.


For example:
Input Matrix: [ [ 1, 2, 3 ]
[ 4, 5, 6 ]
[ 7, 8, 9 ] ]
Output Matrix: [ [ 4, 1, 2 ]
[ 7, 5, 3 ]
[ 8, 9, 6 ] ]
The output matrix is generated by rotating the elements of the input matrix in a clockwise direction. Note that every element is rotated only once.
You do not need to print anything; it has already been taken care of. Also, update the given matrix in-place.



Let the input sequences be X[0 . . . m-1] and Y[0 . . . n-1] of lengths m and n respectively. And let L(X[0 . . . m-1], Y[0 . . . n-1]) be the length of the LCS of the two strings X and Y.
Following is the recursive definition of L(X[0 . . . m-1], Y[0 . . . n-1]).
1: If the last characters of both sequences match (or X[m-1] = Y[n-1]) then
L(X[0 . . . m-1], Y[0 . . . n-1]) = 1 + L(X[0 . . . m-2], Y[0 . . . n-2])
2: If last characters of both sequences do not match then
L(X[0 . . . m-1], Y[0 . . . n-1]) = MAX ( L(X[0 . . . m-2], Y[0 . . . n-1]), L(X[0 . . . m-1], Y[0 . . . n-2]) )
Follow the below steps to implement the idea:
1: Create a recursive function [say lcs()].
2: Check the relation between the last characters of the strings that are not yet processed.
Depending on the relation call the next recursive function as mentioned above.
3: Return the length of the LCS received as the answer.
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out the minimum no. of races which are required to get the top 3 horses.
Tip 1: Try to solve this problem in brute force approach.
Tip 2: Before giving the interview try to solve at least 20-25 puzzle questions.
Tip 3:
Timing : 7pm



If the dictionary consists of the following words:-
["caa", "aaa", "aab"], and 'K' is 3.
Then, the order of the alphabet is -
['c', 'a', 'b']
If the language consists of four letters, the four letters should be the starting four letters of the English language.
However, their order might differ in the alien language.


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
1: The Brute Force and Easy Way To do it:
The Approach: the approach is very simple that we use to have linear search/mapping thing.
2: Another efficient approach that doesn’t require typecasting is explained below.
1) Perform binary search on the middle column
till only two elements are left or till the
middle element of some row in the search is
the required element 'x'. This search is done
to skip the rows that are not required
2) The two left elements must be adjacent. Consider
the rows of two elements and do following
a) check whether the element 'x' equals to the
middle element of any one of the 2 rows
b) otherwise according to the value of the
element 'x' check whether it is present in
the 1st half of 1st row, 2nd half of 1st row,
1st half of 2nd row or 2nd half of 2nd row.
Note: This approach works for the matrix n x m
where 2 <= n. The algorithm can be modified
for matrix 1 x m, we just need to check whether
2nd row exists or not

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