Tip 1 : Practice Ds algo questions daily
Tip 2 : Add practical based questions
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
There were 2 sections :-
1st section consists of Mcqs related to DBMS , DS algo , aptitude
2nd question :- coding round



The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:

Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
Diameter of a tree can be calculated by only using the height function, because the diameter of a tree is nothing but maximum value of (left_height + right_height + 1) for each node. So we need to calculate this value (left_height + right_height + 1) for each node and update the result. Time complexity – O(n)



Given array/list can contain duplicate elements.
(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
A simple solution is to traverse each element and check if there’s another number in the array which can be added to it to give sum.



An element of one array can be mapped only to one element of the array. For example :
Array 1 = {“ab”, “dc”, “ab”, “ab”}
Array 2 = {“dc”, “ab”, “ab”}
The common elements for the above example will be “dc”, “ab”, and “ab”.
A simple solution is to first find intersection of two arrays and store the intersection in a temporary array, then find the intersection of third array and temporary array.
Time complexity of this solution is O(n1 + n2 + n3) where n1, n2 and n3 are sizes of ar1[], ar2[] and ar3[] respectively
This was the technical round. The interviewer was calm and gentle. He starts with my introduction and then ask about my projects. Then he gave me 2 coding questions to solve


Two strings are said to be a permutation of each other when either of the string's characters can be rearranged so that it becomes identical to the other one.
Example:
str1= "sinrtg"
str2 = "string"
The character of the first string(str1) can be rearranged to form str2 and hence we can say that the given strings are a permutation of each other.
This method assumes that the set of possible characters in both strings is small. In the following implementation, it is assumed that the characters are stored using 8 bit and there can be 256 possible characters.
Create count arrays of size 256 for both strings. Initialize all values in count arrays as 0.
Iterate through every character of both strings and increment the count of character in the corresponding count arrays.
Compare count arrays. If both count arrays are same, then return true.



Given an array, the solution is to find the maximum sum subsequence where no two selected elements are adjacent. So the approach to the problem is a recursive solution.
So there are two cases:
If an element is selected then the next element cannot be selected.
if an element is not selected then the next element can be selected.
What is thread in OS?
What is a process? What are the different states of a process?
What are joins?
Give brief about your projects.
what is Activity lifecycle in Android Development.
Give your introduction. what are your projects
How do you rate your coding skills.
what do you know about our company.? Tell me about your strengths and weaknesses .
Which subject you liked most and unlike most.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?