UHG interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

UHG
upvote
share-icon
5 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

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.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

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.

Interview rounds

01
Round
Hard
Coding Test - Pen and paper
Duration45 minutes
Interview date15 Sep 2016
Coding problem1

The first round was a pen and paper aptitude test. The level of test was very high. Questions were very lengthy. I could only manage to solve around 15 questions in the time limit. +1 was given for correct answer and -0.5 for wrong answer. Though the cutoff to clear the test was around 7-8 out of 30, only 28 students out of the 150 students sat were able to clear the test.
Tip 1 : Do practice aptitude questions as much as you can before going for the test.
Tip 2 : Don't try to guess any question's answer. If you are not getting it, just leave it.

1. Puzzle

Calculate area of a Circle inscribed in a Square

Problem approach

Formula to find the area of an inscribed circle:∏ /{4} * a^2 where a is the side of a square in which a circle is inscribed.

02
Round
Easy
Coding Test - Pen and paper
Duration30 minutes
Interview date15 Sep 2016
Coding problem2

The second round was the pen and paper coding round. This round was mandatory for computer science students and optional for other branches. There were 3 questions given to us for which we had to write the code in any of the programming language we know.
All of the codes were pretty simple.
This test was taken just for the sake of asking questions in the interview and not for the selection for interview. Selection for interview was done completely on the basis of aptitude test.

Tip 1 : Just stay calm and cool. You would be having enough time to write. 
Tip 2 : Practice on GeeksForGeeks and Code Studio.

1. Convert a Binary Tree into its Mirror Tree

Easy
15m average time
85% success
0/40
Asked in companies
AdobeWalmartThales

Given a binary tree, convert this binary tree into its mirror tree.

A binary tree is a tree in which each parent node has at most two children.

Mirror of a Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged.

alt text

Note:
1. Make in-place changes, that is, modify the nodes given a binary tree to get the required mirror tree.
Problem approach

This can be solved using recursion. 
Steps :
(1) Call Mirror for left-subtree i.e., Mirror(left-subtree)
(2) Call Mirror for right-subtree i.e., Mirror(right-subtree)
(3) Swap left and right subtrees.
temp = left->subtree
left->subtree = right->subtree
right->subtree = temp

Worst-case Time complexity is O(n) 
Auxiliary space complexity : O(h) where h is the height of the tree.

Try solving now

2. Longest Common Subsequence

Moderate
39m average time
0/80
Asked in companies
PayPalSliceShareChat

Given two strings, 'S' and 'T' with lengths 'M' and 'N', find the length of the 'Longest Common Subsequence'.

For a string 'str'(per se) of length K, the subsequences are the strings containing characters in the same relative order as they are present in 'str,' but not necessarily contiguous. Subsequences contain all the strings of length varying from 0 to K.

Example :
Subsequences of string "abc" are:  ""(empty string), a, b, c, ab, bc, ac, abc.
Problem approach

This problem can be solved using recursion. In this approach, we will start form last element of both the strings. If elements at the last matches then we will decrement length of both the string else we will decrement the length of either of the string.

lcs(s1, s2, n, m):
	if n == 0 or m == 0:
		return 0
	if s1[n-1] == s2[m - 1]:
		return 1 + lcs(s1, s2, n-1, m-1)
	else:
		return max(lcs(s1, s2, n-1, m), lcs(s1, s2, n, m-1))

 

But this approach would result in TLE for longer test cases. It can be optimized using dynamic programming.

In the top down approach, we make a table of size [m+1][n+1] where m and n are the length of the strings. The intermediate row and column of the table indicates what will be the value of the longest common subsequence if its called for the smaller inputs.

if s1[i - 1] == s2[j - 1]:
	dp[i][j] = dp[i - 1][j - 1] + 1
else:
	dp[i][j] = max(dp[i][j - 1], dp[i - 1][j])
Try solving now
03
Round
Easy
Face to Face
Duration40 minutes
Interview date15 Sep 2016
Coding problem5

This round was pretty simple. I had written DS, ADA and DBMS in my resume. That's why he asked me all the questions from them only. I answered almost all the questions quickly and got called for the 2nd interview after few minutes. This interview lasted for around 35-40 minutes. The interviewer was very friendly. He even offered me coffee and biscuits in between.


Tip 1 : Just stick to the basics of the core subjects.
Tip 2 : Be very careful and specific about the things you mention in your resume.
Tip 3 : Stay calm and cool.

1. Inorder Traversal of a Binary Tree

Easy
32m average time
0/40
Asked in companies
MakeMyTripWells FargoAmazon

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values. Your task is to return the In-Order traversal of the given binary tree.


For example :
For the given binary tree:

The Inorder traversal will be [5, 3, 2, 1, 7, 4, 6].
Problem approach

Inorder Traversal using Recursion
Algorithm Inorder(tree)
1. Traverse the left subtree, i.e., call Inorder(left-subtree)
2. Visit the root.
3. Traverse the right subtree, i.e., call Inorder(right-subtree)

Inorder traversal of tree without recursion
Inorder traversal requires that we print the leftmost node first and the right most node at the end. 
So basically for each node we need to go as far as down and left as possible and then we need to come back and go right. So the steps would be : 
1. Start with the root node. 
2. Push the node in the stack and visit it's left child.
3. Repeat step 2 while node is not NULL, if it's NULL then pop the topmost node from the stack and print it.
4. Now move to node's right child and repeat step 1
5. Repeat the above steps while node is not NULL and stack is not empty

Try solving now

2. Nth Fibonacci

Easy
0/40
Asked in companies
SAP LabsHCL TechnologiesWalmart

The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

    F(n) = F(n - 1) + F(n - 2), 
    Where, F(1) = 1, F(2) = 1


Provided 'n' you have to find out the n-th Fibonacci Number. Handle edges cases like when 'n' = 1 or 'n' = 2 by using conditionals like if else and return what's expected.

"Indexing is start from 1"


Example :
Input: 6

Output: 8

Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:    
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Problem approach

The recursive approach involves direct implementation of mathematical recurrence formula. 
F(n) = F(n-1)+F(n-2)
Pseudocode :
fibonacci(n):
if(n<=1)
return n;
return fibonacci(n-1) + fibonacci(n-2)

This is an exponential approach. 
It can be optimized using dynamic programming. Maintain an array that stores all the calculated fibonacci numbers so far and return the nth fibonacci number at last. This approach will take O(n) time complexity and O(n) auxiliary space.

Try solving now

3. DBMS Question

What are views?

Problem approach

Views in SQL are kind of virtual tables. A view also has rows and columns as they are in a real table in the database. We can create a view by selecting fields from one or more tables present in the database. A View can either have all the rows of a table or specific rows based on certain condition.

4. DBMS Question

How indexes are implemented?

Problem approach

B Trees, B+ Trees

5. DBMS Question

What are the different integrity constraints?

Problem approach

1. Domain constraints
Domain constraints can be defined as the definition of a valid set of values for an attribute.
The data type of domain includes string, character, integer, time, date, currency, etc. The value of the attribute must be available in the corresponding domain.

2. Entity integrity constraints
The entity integrity constraint states that primary key value can't be null.
This is because the primary key value is used to identify individual rows in relation and if the primary key has a null value, then we can't identify those rows. A table can contain a null value other than the primary key field.

3.3. Referential Integrity Constraints
A referential integrity constraint is specified between two tables.
In the Referential integrity constraints, if a foreign key in Table 1 refers to the Primary Key of Table 2, then every value of the Foreign Key in Table 1 must be null or be available in Table 2.

4. Key constraints
Keys are the entity set that is used to identify an entity within its entity set uniquely.
An entity set can have multiple keys, but out of which one key will be the primary key. A primary key can contain a unique and null value in the relational table.

04
Round
Easy
Face to Face
Duration30 minutes
Interview date15 Sep 2016
Coding problem3

This interview was fun to me. I enjoyed it a lot. It was a technical-cum-HR interview :D He started by asking questions regarding SDLC and as I started with that, he started making questions from the answers I was giving. He asked me questions regarding working in teams, that would I be comfortable working in a team with a boss or in a team where there is no boss. I answered all the questions very carefully giving him a valid reason. This interview lasted for around 25-30 minutes.


Tip : 1. Do your ground work about the company before going for the interview like you should be very clear about optum and UnitedHealth Care in which the UHG is divided and about their visions.


Tip : 2. Enjoy the interview and do keep a short smile on your face. :)

1. Software Engineering Question

What is SDLC?

Problem approach

SDLC is a process followed for a software project, within a software organization. It consists of a detailed plan describing how to develop, maintain, replace and alter or enhance specific software. The life cycle defines a methodology for improving the quality of software and the overall development process.

A typical Software Development Life Cycle consists of the following stages −

Stage 1: Planning and Requirement Analysis
Requirement analysis is the most important and fundamental stage in SDLC. It is performed by the senior members of the team with inputs from the customer, the sales department, market surveys and domain experts in the industry. This information is then used to plan the basic project approach and to conduct product feasibility study in the economical, operational and technical areas. Planning for the quality assurance requirements and identification of the risks associated with the project is also done in the planning stage. The outcome of the technical feasibility study is to define the various technical approaches that can be followed to implement the project successfully with minimum risks.

Stage 2: Defining Requirements
Once the requirement analysis is done the next step is to clearly define and document the product requirements and get them approved from the customer or the market analysts. This is done through an SRS (Software Requirement Specification) document which consists of all the product requirements to be designed and developed during the project life cycle.

Stage 3: Designing the Product Architecture
SRS is the reference for product architects to come out with the best architecture for the product to be developed. Based on the requirements specified in SRS, usually more than one design approach for the product architecture is proposed and documented in a DDS - Design Document Specification. This DDS is reviewed by all the important stakeholders and based on various parameters as risk assessment, product robustness, design modularity, budget and time constraints, the best design approach is selected for the product.
A design approach clearly defines all the architectural modules of the product along with its communication and data flow representation with the external and third party modules (if any). The internal design of all the modules of the proposed architecture should be clearly defined with the minutest of the details in DDS.

Stage 4: Building or Developing the Product
In this stage of SDLC the actual development starts and the product is built. The programming code is generated as per DDS during this stage. If the design is performed in a detailed and organized manner, code generation can be accomplished without much hassle.
Developers must follow the coding guidelines defined by their organization and programming tools like compilers, interpreters, debuggers, etc. are used to generate the code. Different high level programming languages such as C, C++, Pascal, Java and PHP are used for coding. The programming language is chosen with respect to the type of software being developed.

Stage 5: Testing the Product
This stage is usually a subset of all the stages as in the modern SDLC models, the testing activities are mostly involved in all the stages of SDLC. However, this stage refers to the testing only stage of the product where product defects are reported, tracked, fixed and retested, until the product reaches the quality standards defined in the SRS.

Stage 6: Deployment in the Market and Maintenance
Once the product is tested and ready to be deployed it is released formally in the appropriate market. Sometimes product deployment happens in stages as per the business strategy of that organization. The product may first be released in a limited segment and tested in the real business environment (UAT- User acceptance testing).
Then based on the feedback, the product may be released as it is or with suggested enhancements in the targeting market segment. After the product is released in the market, its maintenance is done for the existing customer base.

2. Software Engineering Question

What is Agile Methodology?

Problem approach

The Agile methodology is a way to manage a project by breaking it up into several phases. It involves constant collaboration with stakeholders and continuous improvement at every stage. Once the work begins, teams cycle through a process of planning, executing, and evaluating. Continuous collaboration is vital, both with team members and project stakeholders.

Agile methodologies overview
The Agile Manifesto of Software Development put forth a groundbreaking mindset on delivering value and collaborating with customers when it was created in 2001. Agile's four main values are :
1) Individuals and interactions over processes and tools
2) Working software over comprehensive documentation
3) Customer collaboration over contract negotiation
4) Responding to change over following a plan

3. Factorial of a Number

Moderate
25m average time
70% success
0/80
Asked in companies
HCL TechnologiesHCL TechnologiesWells Fargo

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Problem approach

Factorial can be calculated using following recursive formula: 

n! = n * (n-1)!

n! = 1 if n = 0 or n = 1

Factorial can also be calculated iteratively as recursion can be costly for large numbers. 

 

Factorial(n)
{
	//Initialise a variable res = 1
	long long res=1
	for (i = 2 to i <= n) do :
		res = res* i
	return res
}
Try solving now
05
Round
Easy
HR Round
Duration15 minutes
Interview date15 Sep 2016
Coding problem1

This round lasted for around 10-15 minutes only. The interviewer was very calm and friendly. As I went in, I was shivering, he then asked me if I'm nervous? I said no. He then made me feel calm by telling stories of his time when he was at my stage giving interviews and about other things that stage fear is a normal thing and butterflies in stomachs are also normal. After that I enjoyed answering to him each question :)


Tip : Stay confident.

1. Basic HR Questions

1) Why UHG?

2) Where do you see yourself after 3-5 years?

3) How do you like Himachal? (As I'm from plains and I study here in Himachal)

4) Introduce yourself!
5) Tell 1 thing which is not present in the resume and which you want from life.
6) Then asked me questions with obvious answers like "Are you willing to relocate?", "Are you ready to work in night shifts?" etc.
7) Asked me some questions regarding my family.
8) My strengths and weaknesses.

Problem approach

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.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 11 problems
Interviewed by UHG
1583 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 4 problems
Interviewed by UHG
1059 views
0 comments
0 upvotes
SDE - 1
4 rounds | 4 problems
Interviewed by UHG
943 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by UHG
1302 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes