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.
This was an online coding round where we had 2 questions and some Technical MCQ's to solve. The coding questions were supposed to be solved under 1 hour and the questions were not so tough as such.



If the given array is [1, 3, 2], then you need to return [3, -1, -1]. Because for 1, 3 is the next greater element, for 3 it does not have any greater number to its right, and similarly for 2.
Approach :
1) Initialize an array ‘ANS’ of integer type and the same size as the input array to store the Next Greater Elements.
2) Declare a stack ‘S’ of integer type that will have Next Greater Element as its top element.
3) Iterate the array in reverse order. (say, iterator = ‘i’).
4) Pop from ‘S’ until the stack ‘S’ is not empty and the current element is greater than the top element of the stack.
5) Update ‘ANS[i]’ with the top element of ‘S’.
6) If the stack is empty then update ‘ANS[i]’ with -1.
7) Push the current element onto the stack ‘S’.
8) Return ‘ANS’.
TC : O(N), where N=number of elements in the array
SC : O(N)

You do not need to print anything; it has already been taken care of. Just implement the given function.
Approach :
1) Sort the array in descending order.
2) Print all the ones, if present.
3) From the remaining array print it in descending order making sure not to reprint the ones again.
TC : O(N * log(N)), where N=size of the array.
SC : O(1)
This round started with 2 coding questions and then moved on to some more questions from OOPS.


The given linked list is 1 -> 2 -> 3 -> 2-> 1-> NULL.
It is a palindrome linked list because the given linked list has the same order of elements when traversed forwards and backward.
Can you solve the problem in O(N) time complexity and O(1) space complexity iteratively?
Approach :
1) Recursively traverse the entire linked list to get the last node as a rightmost node.
2) When we return from the last recursion stack. We will be at the last node of the Linked List. Then the last node value is compared with the first node value of Linked List.
3) In order to access the first node of Linked List, we create a global left pointer that points to the head of Linked List initially that will be available for every call of recursion and the right pointer which passes in the function parameter of recursion.
4) Now, if the left and right pointer node value is matched then return true from the current recursion call. Then the recursion falls back to (n-2)th node, and then we need a reference to the 2nd node from head. So we advance the left pointer in the previous call to refer to the next node in the Linked List.
5) If all the recursive calls are returning true, it means the given Linked List is a palindrome else it is not a palindrome.
TC : O(N), where N = number of nodes in the linked list.
SC : O(N)



Can you solve each query in O(logN) ?
This was a preety standard Binary Search Question and I had solved this question before on platforms like LeetCode and CodeStudio. I was asked this question to test my implementation skills and how well do I handle Edge Cases.
Approach :
1) The idea is to find the pivot point, divide the array in two sub-arrays and perform binary search.
2) The main idea for finding pivot is – for a sorted (in increasing order) and pivoted array, pivot element is the only element for which next element to it is smaller than it.
3) Using the above statement and binary search pivot can be found.
4) After the pivot is found out divide the array in two sub-arrays.
5) Now the individual sub–arrays are sorted so the element can be searched using Binary Search.
TC : O(Log(N))
SC : O(1)
What is Static variable in C ?
1) Static variables are initialized only once.
2) The compiler persists with the variable till the end of the program.
3) Static variables can be defined inside or outside the function.
4) They are local to the block.
5) The default value of static variables is zero.
6) The static variables are alive till the execution of the program.
Here is the syntax of static variables in C language,
static datatype variable_name = value;
Here,
datatype − The datatype of variable like int, char, float etc.
variable_name − This is the name of variable given by user.
value − Any value to initialize the variable. By default, it is zero.
What is the Difference Between Abstraction and Inheritance?
The main difference between abstraction and inheritance is that abstraction allows hiding the internal details and displaying only the functionality to the users, while inheritance allows using properties and methods of an already existing class.
“Java is not a pure OO language”. Justify this statement.
Java is not fully object oriented because it supports primitive data type like it,byte,long etc.,which are not objects. Because in JAVA we use data types like int, float, double etc which are not object oriented, and of course is what the opposite of OOP is. That is why JAVA is not 100% objected oriented.
What are some advantages of using OOPs?
1) OOPs is very helpful in solving very complex level of problems.
2) Highly complex programs can be created, handled, and maintained easily using object-oriented programming.
3) OOPs, promote code reuse, thereby reducing redundancy.
4) OOPs also helps to hide the unnecessary details with the help of Data Abstraction.
5) OOPs, are based on a bottom-up approach, unlike the Structural programming paradigm, which uses a top-down approach.
6) Polymorphism offers a lot of flexibility in OOPs.
What are access specifiers and what is their significance?
Access specifiers, as the name suggests, are a special type of keywords, which are used to control or specify the accessibility of entities like classes, methods, etc. Some of the access specifiers or access modifiers include “private”, “public”, etc. These access specifiers also play a very vital role in achieving Encapsulation - one of the major features of OOPs.
This was my last round and I hoped it to go good just like the other rounds. The interviewer was very straight to point and professional. The interview lasted for 30 minutes.
Why should we hire you ?
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?