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

SDE - Intern

UHG
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Operating Systems, Data Structures, Algorithms, Project, Math puzzles
Tip
Tip

Tip 1 : Be very informative of your project and brush it up before the interview process
Tip 2 : In the Aptitude round, aptitude questions were relatively harder but coding problems are very easy

Application process
Where: Campus
Eligibility: Above 7.5 GPA
Resume Tip
Resume tip

Tip 1 : Describe your project(s) well and put GitHub link
Tip 2 : They also asked non-technical topics that were in my resume

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date3 Aug 2020
Coding problem2

There were 30 MCQ questions and 2 coding problems. The MCQs were medium-level questions. Coding problems were fairly easy.

1. Program to check the validity of a Password

Easy
20m average time
80% success
0/40
Asked in companies
UHG314e Corporation

Ninjas are trying to hack a system of a terrorist organization so that they can know where they will be going to attack next. But to hack the system and to get access to data they need a password that must satisfy certain conditions as described below:

1) Length of the password must be between 8 to 15 characters.
2) At least one digit (0-9), one lowercase letter (a-z), one uppercase letter (A-Z) and one special character (%, ^, &, #, *, %, etc) must be present.
3) Password must not contain any space.

You are given a string ‘STR’, help ninjas to find whether it's a valid password or not.

For example :

Given ‘STR’ =  “Codingninja#1” As it satisfies all the above conditions so it is a valid password and therefore you have to return true.
Problem approach

1.) Maintained 4 flags as "false" for checking the capital letter, small letter, special character and number.
2.) Iterated the string and checking every character in it for the above 4 flags.
3.) If either of the flags were false, returned 'false'
4.) If the length of string was less than 'K', returned 'false'
5.) Returned 'true'

Try solving now

2. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
IBMQuikrMicrosoft

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

1.) Maintained a 'prev' pointer and 'temp' pointer.
2.) Iterated the list and saved the next pointer of the current node as temp and assigned current->next = prev and then, prev = current, this is the general approach for reversing the list.
3.) Returned prev

Try solving now
02
Round
Medium
Face to Face
Duration50 minutes
Interview date5 Aug 2020
Coding problem1

The interview was scheduled by the placement cell in the evening. The interviewer seemed to be an experienced developer.
He asked me general background questions like what are you interested most in? what are your technical interests? etc.
He then asked me about my project. Explained him well on that front and he seemed satisfied. He asked me to find the Lowest Common Ancestor of a given Binary Search Tree. I solved it in around 20-30 minutes and he finally asked me to write the solution on paper. He asked some practical OOPs problems for a while and I answered correctly but the explanations could be more thorough.

1. LCA of binary tree

Moderate
10m average time
90% success
0/80
Asked in companies
GrabDisney + HotstarShareChat

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.


The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.


Note :
You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For example :
For the given binary tree

Example

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Problem approach

This problem was alien to me at that time. But, I was familiar with BST. Solved the problems using 'parent' pointers first.
Then, came up with the following recursive idea.

function signature: LCA(Node* root , int n1, int n2)

1.) If the current root is NULL, return NULL.
2.) If root->val> n1 && root->val > n2:
return LCA(root->left , n1 , n2)
3.) If root->val < n1 && root->val < n2
return LCA(root->right , n1 , n2)
4.) return root

Try solving now
03
Round
Easy
HR Round
Duration30 minutes
Interview date5 Aug 2020
Coding problem1

The interview was some 30 minutes after the technical round. The HR asked me general questions like my hobbies, technical and non-technical things in my resume, my interests, etc. The overall communication was very friendly.

1. General Questions

What do you do to relieve stress? Tell me something outside of your academics.

Problem approach

Tip 1 : I listen to music and mostly take a walk for some fresh air in the evening/morning.
Tip 2 : I am a team person and believe that the whole is greater than the sum of parts. I am interested in painting and writing and am currently a coordinator at the literary committee of the college.

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - Intern
3 rounds | 4 problems
Interviewed by UHG
1047 views
0 comments
0 upvotes
SDE - 1
3 rounds | 11 problems
Interviewed by UHG
1558 views
0 comments
0 upvotes
Software Developer
3 rounds | 5 problems
Interviewed by UHG
1115 views
0 comments
0 upvotes
SDE - 1
4 rounds | 4 problems
Interviewed by UHG
926 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15481 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15339 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes