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

SDE - 1

UHG
upvote
share-icon
3 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, OOPS, SQL,Operating System
Tip
Tip

Tip 1 : Competitive Programming
Tip 2 : Do atleast 2 projects
 

Application process
Where: Campus
Eligibility: Above 70% marks
Resume Tip
Resume tip

Tip 1 : To be precise, mention your technical skills, achievements, dont write anything unnecessary plus write your professional summary good mention your project details in not more than 2 lines and make sure those sentences make sense to reader.
Tip 2 : Resume should be not more than one page. Write everything within one page

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date8 Aug 2019
Coding problem2

30 Aptitude problems and two coding questions

1. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
AmazonMicrosoftInfosys

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').
Problem approach

This problem is classic problem known as inversion count. I solved this problem using merge sort tree and got full points if we apply brute force on this then we will get time limit exceeded so we have to solve this in O(nlogn) complexity.

Try solving now

2. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
Paytm (One97 Communications Limited)AmazonSnapdeal

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Problem approach

This problem in know as kadane's algorithm i solved this one using single for loop and passed successfully all the test cases.

Try solving now
02
Round
Medium
Face to Face
Duration90 minutes
Interview date7 Aug 2019
Coding problem6

Data structure and algorithms plus object oriented problems

1. Merge Sort

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

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

Step 1 : I wrote first merge sort algorithm then i explained the worst case complexity for this one.
Step 2 : Interviewer cross questioned me what is divide and conquer approach.
Step 3 : I gave the definition for divide and conquer method
Step 4 : Then I continued explaining quick sort algorithm
Step 5 : Interviewer asked me about worst case scenario for quick sort then i replied when the array is already sorted he was happy.

Try solving now

2. Write code for catching an exception .

Problem approach

Step 1 : I wrote a code for catching divide by zero exception
Step 2 : Then interviewer asked me about use of try catch finally and implement all in your code
Step 3 : Then I applied try first then catch statement for exception and then i wrote finally block .he was satisfied after my approach

3. What are access modifier explain all using code.

Problem approach

Step 1 : I gave definition for access modifiers public private and protected then i used these modifiers in my code that i wrote in C++.
Step 2 : He asked me if we are in same package then can we access using protected or not then i replied yes.
Step 3 : Then interviewer asked me to write code for friend function.
Step 4 : I was not able to write that code then he helped me to write that code.

4. Theoretical problem

What is hashing? 
How to remove collision in hashing? 
What is open addressing ?

Problem approach

Tip 1 : Do practice about hash table data structure .
Tip 2 : Read about open addressing and closed addressing
Tip 3 : Learn how to remove collision. what are linear probing and quadratic probing

5. Difference between overloading and overriding.

Problem approach

Tip 1 : Clear your concept in object oriented programming
Tip 2 : Do practice on OOPs concept ( Abstraction,Encapsulation,Inheritance,Polymorphism)
Tip 3 : Practice on concepts like overloading overriding interface packages multi threading

6. Delete Node In A Linked List

Easy
15m average time
80% success
0/40
Asked in companies
AdobeCIS - Cyber InfrastructureDell Technologies

You are given a Singly Linked List of integers and a reference to the node to be deleted. Every node of the Linked List has a unique value written on it. Your task is to delete that node from the linked list.

A singly linked list is a linear data structure in which we can traverse only in one direction i.e. from Head to Tail. It consists of several nodes where each node contains some data and a reference to the next node.

Note:

• The reference to the head of the linked list is not given.
• The node to be deleted is not a tail node.
• The value of each node in the Linked List is unique.
• It is guaranteed that the node to be deleted is present in the linked list.

A sample Linked List-

singly_linkedlist

Problem approach

Step 1 : I wrote all condition for deletion in linked list first from the beginning of the linked list then between linked list and then deleting last node for linked list
Step 2 : Interviewer asked about complexity for each of them i replied for all three cases.
Step 3 : Then i explained it using diagram how we are implementing this algo
Step 4 : He found an error in my code when we have only one node
Step 5 : I resolved that one then he was satisfied

Try solving now
03
Round
Easy
Face to Face
Duration60 miinutes
Interview date7 Aug 2019
Coding problem3

Database questions and discussion about projects

1. DBMS

What is normal form and explain BCNF.

Problem approach

Tip 1 : Do clear your concept of basic dbms topics like functional dependency and normal forms
Tip 2 : Do practice on Sql commands
Tip 3 : Read examples on each normal forms

2. DBMS

What is the difference between while keyword and having keyword?

Problem approach

Tip 1 : Do practice on sql commands
Tip 2 : Read about concepts of Sql like primary key candidate key foreign key
Tip 3 : Read concepts like DDL,DML,DCL

3. Project Explanation

Explain your best project?
Why machine learning project?
What are data frames?
Difference between classification and regression.

Problem approach

Tip 1 : Do atleast two major projects.
Tip 2 : Explain your role in your project what you have done in your project
Tip 3 : Do have good knowledge of technologies and stacks that are using in project.

Here's your problem of the day

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

Skill covered: Programming

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
SDE - Intern
3 rounds | 4 problems
Interviewed by UHG
782 views
0 comments
0 upvotes
SDE - 1
5 rounds | 12 problems
Interviewed by UHG
578 views
0 comments
0 upvotes
SDE - 1
4 rounds | 4 problems
Interviewed by UHG
707 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by UHG
857 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
107484 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
51830 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
32109 views
6 comments
0 upvotes