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 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.
In this round, the interviewer asked me 2 coding questions , the first one was related to Simple Hashing and the second one was to implement Kadane's Algorithm. I coded both the solutions in the given time and at the end was also asked some questions revolving around OOPS and C#.



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
Approach :
1) We can store the frequency of every element in the array in a hashmap.
2) We will loop over every index i, and check the frequency of (Target - ARR[i]) is the hashmap :
2.1) If (Target - ARR[i]) is equal to ARR[i], we will check if frequency of ARR[i] . If it is greater than 1 then we will
decrease the frequency of ARR[i] by 2 and add a pair (ARR[i] , ARR[i]) to our answer.
2.2) Else, if the frequency of ARR[i] and Target - ARR[i] is greater than equal to 1 then we add pair (ARR[i], Target -
ARR[i]) to our answer and decrease the frequency of both by 1.
3) If no valid pairs exist, we will return [[-1,-1]].
TC : O(N) , where N = size of the array
SC : O(N)



Approach (Using Kadane's Algo) :
1) Declare a variable ‘maxSum’ and initialize it with ‘minimum integer’.
2) Declare a variable ‘localSum’ and initialize it with ‘0’.
3) Declare 3 counter variables as ‘start’ , ‘end’ , ‘newStart’ as 0, 0, 0.
4) Run a loop from i = 0 to N
4.1) Add a current element to ‘localSum’.
4.2) If 'localSum' is greater than 'maxSum'
Update ‘maxSum’ with 'localSum', update start with ‘newStart’ and end with loop counter ‘i’.
4.3) If 'localSum' is equal to ‘maxSum’ and the difference between ‘end’ and ‘start’ is less than the difference between ‘newStart’ and ‘i’
Update start with ‘newStart’ and end with ‘i’.
4.4) If 'localSum' is below ‘0’
Update ‘localSum’ as 0 and set ‘newStart' as ‘i’ + 1.
5) Return the part of the array starting from ‘start’ and ending at ‘end’.
TC : O(N), where N=size of the array
SC : O(N), we need a final array to store the result maximum subarray.
What do you mean by data encapsulation?
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in
a single unit.
2) It helps developers to follow modularity while developing software by ensuring that each object is independent of
other objects by having its own methods, attributes, and functionalities.
3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.
What are the different ways in which a method can be Overloaded in C#?
Overloading means when a method has the same name but carries different values to use in a different context. Only the main() method cannot be overloaded.
In order to overload methods in C#,
1) Change the number of parameters in a method, or
2) Change the order of parameters in a method, or
3) Use different data types for parameters
In these ways, you can overload a method multiple times.
EXAMPLE :
public class Area {
public double area(double x) {
double area = x * x;
return area;
}
public double area(double a, double b) {
double area = a * b;
return area;
}
}
Here, the method Area is used twice. In the first declaration, one argument is used while in the second one, there were two arguments are used. Using different parameters in the same method, we were able to overload the method area().
This round was preety much mixed and had questions from LINQ , .NET framework, DBMS, OOPS and Design Patterns.
What is LINQ and what are the advantages of using LINQ in Dataset?
LINQ : The word LINQ is the abbreviation of the Language Integrated Query. It's a .NET framework module that connects native data querying capabilities to .net Language. It offers easy data access from in-memory objects, databases, XML documents, and many more.
The advantages of LINQ are as follows -
1) The primary purpose of using LINQ is to retrieve complex query in a dataset.
2) LINQ is used to combine the values from two different data set.
3) It is also used to fetch a unique value from the data set.
4) LINQ gives a more precise way than SQL query of querying the dataset.
5) LINQ also provides more functionality as compared with ADO.NET.
Differentiate between LINQ and Stored Procedure.
Some significant differences between LINQ and Stored Procedure are as follows -
1) The stored procedure is faster than a LINQ query because they follow a proper (Expected) execution plan.
2) It is easy to avoid run time errors in SQL query than in comparison to a stored procedure.
3) LINQ uses the .NET debugger to allow debugging, which is not in case of stored procedures.
4) LINQ supports multiple databases in contrast to stored procedures.
5) Deployment of LINQ based solution is more comfortable than the deployment of a stored procedure.
What is Expression Tree in LINQ?
Lambda expressions are extensively used in Expression Tree construction. An Expression Tree represents code in a tree-like format, where each node acts as an impression. Expression trees can be converted into compiled code and run it.
In, .NET framework, Expression class is used to create expression tree through the API. Expression Trees API also support assignment and some control flow expression such as conditional blocks, loops, and try-catch blocks. By using the API, we can generate expression trees that are more complex than those that can be created from lambda expressions.
What is a delegate in .NET?
A delegate is a .NET object which defines a method signature and it can pass a function as a parameter.
Delegate always points to a method that matches its specific signature. Users can encapsulate the reference of a method in a delegate object.
When we pass the delegate object in a program, it will call the referenced method. To create a custom event in a class, we can make use of delegate.
What is MIME in .NET?
MIME stands for Multipurpose Internet Mail Extensions. It is the extension of the e-mail protocol which lets users use the protocol to exchange files over emails easily.
Servers insert the MIME header at the beginning of the web transmission to denote that it is a MIME transaction.
Then the clients use this header to select an appropriate ‘player’ for the type of data that the header indicates. Some of these players are built into the web browser.
Difference between Trigger and Procedure
Triggers :
1) A Trigger is implicitly invoked whenever any event such as INSERT, DELETE, UPDATE occurs in a TABLE.
2) Only nesting of triggers can be achieved in a table. We cannot define/call a trigger inside another trigger.
3) In a database, syntax to define a trigger: CREATE TRIGGER TRIGGER_NAME.
4) Transaction statements such as COMMIT, ROLLBACK, SAVEPOINT are not allowed in triggers.
5) Triggers are used to maintain referencial integrity by keeping a record of activities performed on the table.
Procedures :
1) A Procedure is explicitly called by user/application using statements or commands such as exec, EXECUTE, or simply procedure_name.
2) We can define/call procedures inside another procedure.
3) In a database, syntax to define a procedure: CREATE PROCEDURE PROCEDURE_NAME.
4) All transaction statements such as COMMIT, ROLLBACK are allowed in procedures.
5) Procedures are used to perform tasks defined or specified by the users.
What is Abstraction and Data Encapsulation?
Abstraction :
1) If you are a user, and you have a problem statement, you don't want to know how the components of the software work, or how it's made. You only want to know how the software solves your problem.
2) Abstraction is the method of hiding unnecessary details from the necessary ones. It is one of the main features of OOPs.
3) For example, consider a car. You only need to know how to run a car, and not how the wires are connected inside it. This is obtained using Abstraction.
Encapsulation :
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in a single unit.
2) It helps developers to follow modularity while developing software by ensuring that each object is independent of other objects by having its own methods, attributes, and functionalities.
3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.
What are the types of design patterns in Java?
There are three types of design patterns. They are :
1) Creational Patterns: These patterns provide freedom of choice between creating objects by hiding the logic. The
objects constructed are decoupled from the implemented system. Some of the examples of creational patterns are -
Factory design pattern, Builder design, Prototype design, Singleton design, Abstract Factory design.
2) Structural Patterns: These patterns help in defining how the structures of classes and objects should be like for
defining the composition between classes, interfaces and objects. Some of the examples of structural patterns are -
Adaptor design, Facade design, Decorator design, proxy design etc.
3) Behavioural Patterns: These patterns help to define how the objects should communicate and interact with one
another. Some of the examples of behavioural patterns are - Command pattern, Iterator pattern, Observer pattern,
Strategy pattern, etc.
This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my
role.
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from
your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me
unique from others.
Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more
efficient.
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great
deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is
nothing to worry about if you have a good command over your communication skills and you are able to propagate
your thoughts well to the interviewer.

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