Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
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.
There were 2 tests. The first test consisted of 30 questions, 10 from section 1 based on Aptitude and Logical Reasoning and 20 from section 2 based on OOPS and C/C++.
The second test : I solved 1 problem in C and remaining problems in Java. I used OOPS in better way so it got me additional points.



To solve this question, the concept of heaps can be used. Two heaps can be maintained: a max heap for storing lower half of the numbers and a min heap for storing greater half of the numbers.
Process each element one by one :
Step 1: To add an element to one of the heaps:
Condition : Check if next item is smaller than maxHeap root add it to maxHeap,else add it to minHeap
Step 2: Balance the heaps (after this step heaps will be either balanced or one of them will contain 1 more item)
Condition : If number of elements in one of the heaps is greater than the other by more than 1, remove the root element from the one containing more elements and add to the other one
Step 3: Now to calculate median:
If the heaps contain equal amount of elements;
median = (root of maxHeap + root of minHeap)/2
Else
median = root of the heap with more elements
The time complexity of this approach would be O(nlogn) and auxiliary space complexity is O(n).



This problem can be solved using the hashing concept. The objective is to run over the string and record how many times each character appears in it in a hash map. Then we run over the string again, this time using the hash map as a reference to see if any of the characters are unique. If the character is unique, return the index.
Time Complexity: O(N)
The above approach requires two traversals of the string. To solve the question in a single traversal only, along with storing the count of a character store the index a particular character was encountered the first time. So when it comes to finding the first non-repeating character, just scan the hash map, instead of the string and return the character with occurrences as 1 and least index in the string.



1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.
2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).
2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Structure of an LRU Cache :
1) In practice, LRU cache is a kind of Queue — if an element is reaccessed, it goes to the end of the eviction order
2) This queue will have a specific capacity as the cache has a limited size. Whenever a new element is brought in, it is added at the head of the queue. When eviction happens, it happens from the tail of the queue.
3) Hitting data in the cache must be done in constant time, which isn't possible in Queue! But, it is possible with HashMap data structure
4) Removal of the least recently used element must be done in constant time, which means for the implementation of Queue, we'll use DoublyLinkedList instead of SingleLinkedList or an array.
LRU Algorithm :
The LRU algorithm is pretty easy! If the key is present in HashMap, it's a cache hit; else, it's a cache miss.
We'll follow two steps after a cache miss occurs:
1) Add a new element in front of the list.
2) Add a new entry in HashMap and refer to the head of the list.
And, we'll do two steps after a cache hit:
1) Remove the hit element and add it in front of the list.
2) Update HashMap with a new reference to the front of the list.
Tip : This is a very frequently asked question in interview and its implementation also gets quite cumbersome if you are doing it for the first time so better knock this question off before your SDE-interviews.



You have to move each ninja of given strength from the given list into two separate teams (list) ‘Team_A’ and ‘Team_B’ such that the average strengths of ‘Team_A’ == ‘Team_B’. There has to be at least one member in each team since they cannot play the game without that.
Input : [1, 7, 15, 29, 11, 9]
Output : [9, 15] [1, 7, 11, 29]
Explanation: The average strengths of both the teams is 12
The brute force solution is to run two loops and find subarrays whose averages are equal.
Time Complexity : O(N^2)
An Efficient solution would be to find sum of array elements. Initialize leftsum as zero. Run a loop and find leftsum by adding elements of array. For rightsum, we subtract leftsum from total sum then we find rightsum and find average of leftsum and rightsum as according to their index.
1) Compute sum of all array elements. Let the total sum be "sum"
2) Initialize leftsum = 0.
3) Run a loop for i=0 to n-1.
a) leftsum = leftsum + arr[i]
b) rightsum = sum - leftsum
c) If average of left and right are equal, print the current index as output.
This was a technical round where I was asked 1 DSA problem.



1) The suggested correct strings for the string ‘QUERY’ will be all those strings present in the ‘DICTIONARY[]’ that have the prefix same as the longest prefix of string ‘QUERY’.
2) The ‘DICTIONARY[]’ contains only distinct strings.
Given 'DICTIONARY[]' = {“ninja”, “ninjas”, “nineteen”, “ninny”} and query = “ninjk”. Since “ninjk” is not present in the ‘DICTIONARY[]’, it is an incorrect string. The suggested current spellings for “ninjk” are “ninja” and “ninjas”. It is because “ninj” is the longest prefix of “ninjk” which is present as the prefix in ‘DICTIONARY’.
Trie data structure can be used to solve this problem.
The idea is to traverse the array of string, and insert the string into the Trie such that each node of the Trie contains the character of the string and a boolean value to check if the character is the last character of the string or not.
Steps :
• Initialize a Trie, such that each node of the Trie consists of a character of a string and a boolean value to check if the character is the last character of the string or not.
• Traverse the array of strings and insert all the strings into the Trie.
• Finally, traverse the string key. For every ith character, check if the character is present in the Trie or not. If found to be true, then move to the next node of the Trie.
• Otherwise, print all possible strings whose prefix is the string key.
Time Complexity: O(N * M), where M is the maximum length of the string
Auxiliary Space: O(N * 256)
HR round with typical behavioral problems.
1. Why did not you choose BE?
2. Tell me about Zoho?
3. Tell me about your family
4. If you get more salary in another company, what will you do?
5. What is your aim?
6 Do you have any idea for Higher Studies?
7. Anything you need to ask me?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

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