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

Software Engineer

Optum
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
I've faced significant challenges in my journey, originating from a middle-class background where access to a computer was limited for a considerable period. My introduction to the world of computers occurred during my college years, and since then, I've never turned away from it.
Application story
This is an on-campus placement opportunity for me. The company conducted placement sessions on my campus.
Why selected/rejected for the role?
This was an excellent experience for me I was NOT able to perform well, and I am satisfied with the effort I have put forward.
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Prepare your resume well.
Tip 2: Deploy your projects so that the interviewer can view them. Also, provide a hyperlink on your resume.
Tip 3: Be thorough with Data Structures and Algorithms. Also, prepare well for topics such as OS and DBMS.

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

Tip 1: Deploy your projects so that the interviewer can view them. Also, provide a hyperlink on your resume.
Tip 2: It's not important to have fancy projects. Only mention those in which you're confident.

 

 

 

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date20 Jul 2022
Coding problem2

There are no negative markings for incorrect answers.

1. All Paths From Source Lead To Destination

Moderate
30m average time
70% success
0/80
Asked in companies
MakeMyTripOptumGrab

There is a directed graph consisting of ‘N’ nodes numbered from 0 to ‘N’-1. You are given a list ‘EDGES’ of size ‘M’, consisting of all the edges of this directed graph, and two nodes ‘SRC’ and ‘DEST’ of this graph. Determine whether or not all paths starting from node ‘SRC’ eventually end at node ‘DEST’, that is -:

1. At least one path exists from node ‘SRC’ to node ‘DEST’.

2. If there exists a path from the node ‘SRC’ to a node with no outgoing edges, then that node must be ‘DEST’.

3. There should be a finite number of paths from ‘SRC’ to ‘DEST’.

You should return True if all paths starting from node ‘SRC’ eventually end at node ‘DEST’, Otherwise, return False. See the example for more clarity.

Note :

1. The given graph may have self-loops and parallel edges.
Example :
Consider ‘N’ = 4, ‘EDGES’ = [[0, 1], [0, 3], [1, 2], [3, 2]],  ‘SRC’ = 0 and ‘DEST’ = 2. The given directed graph is shown below.

alt text

Here, all the paths that start from node 0 are -:
1. 0->1->2
2. 0->3->2
Both of these paths eventually end at node ‘2’ i.e node ‘DEST’. Thus we should return True.
Problem approach

The idea is to do Depth First Traversal of the given directed graph.
Start the DFS traversal from the source.
Keep storing the visited vertices in an array or HashMap say ‘path[]’.
If the destination vertex is reached, print the contents of the path[].
The important thing is to mark current vertices in the path[] as visited also so that the traversal doesn’t go in a cycle.

Try solving now

2. Flatten A Linked List

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

You are given a linked list containing 'n' 'head' nodes, where every node in the linked list contains two pointers:


(1) ‘next’ which points to the next node in the list

(2) ‘child’ pointer to a linked list where the current node is the head.


Each of these child linked lists is in sorted order and connected by 'child' pointer.


Your task is to flatten this linked such that all nodes appear in a single layer or level in a 'sorted order'.


Example:
Input: Given linked list is:

Output:
1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9 → 12 → 20 → null.


Explanation:
The returned linked list should be in a sorted order. All the elements in this returned linked list are connected by 'child' pointers and 'next' pointers point to null.


Problem approach

PROGRAM:

Node*merge(Node*a,Node*b){//a=root b=root ka right wala
if(a==NULL)return b;
if(b==NULL)return a;
Node*res;
if(a->datadata)
{
res=a;
res->bottom=merge(a->bottom,b);
}
else{
res=b;
res->bottom=merge(a,b->bottom);
}
res->next=NULL;
return res;
}
Node *flatten(Node *root)
{
if(root==NULL || root->next==NULL)return root;
return merge(root,flatten(root->next));
}

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date21 Jul 2022
Coding problem3

1. Maximum Sum

Moderate
25m average time
75% success
0/80
Asked in companies
OptumAmazonAmazon

You are given an array ‘arr’ consisting of ‘N’ integers. Your task is to maximize the value of 0 * arr[0] + 1 * arr[1] + 2 * arr[2] … (N - 1) * arr[N - 1] . You can rotate the array as many times as you wish.

For Example:
For the given arr[ ] = { 1, 2, 3, 1} 
After 0 rotation arr[ ] = { 1, 2, 3, 1} the sum is = (0 *1 + 1 * 2 + 2 * 3 + 3 * 1) = 11.
After 1 rotation  arr[ ] = { 1, 1, 2, 3} the sum is = (0 *1 + 1 * 1 + 2 * 2 + 3 * 3) = 14.
After 2 rotation arr[ ] = { 3, 1, 1, 2} the sum is = (0 *3 + 1 * 1 + 2 * 1 + 3 * 2) = 9.
After 3 rotation arr[ ] = { 2, 3, 1, 1} the sum is = (0 *2 + 1 * 3 + 2 * 1 + 3 * 1) = 8.
So the maximum sum is 14 when arr[ ] = { 1, 1, 2, 3}.
Problem approach

Sorting each row of the array and picking up the maximum element from each to get the maximum sum.

Try solving now

2. Stack using queue

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonQualcommPhilips

Implement a Stack Data Structure specifically to store integer data using two Queues.


There should be two data members, both being Queues to store the data internally. You may use the inbuilt Queue.


Implement the following public functions :

1. Constructor:
It initializes the data members(queues) as required.

2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.

3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.

4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.

5. size() :
It returns the size of the stack at any given instance of time.

6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Operations Performed on the Stack:
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)

Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)

Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)

Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)

Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Example
Operations: 
1 5
1 10
2
3
4

Enqueue operation 1 5: We insert 5 at the back of the queue.
  Queue: [5]

Enqueue operation 1 10: We insert 10 at the back of the queue.
  Queue: [5, 10]

Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
  Output: 5
  Queue: [10]

Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
  Output: 10
  Queue: [10]

IsEmpty operation 4: We check if the queue is empty.
  Output: False
  Queue: [10]
Problem approach

Make sure that the newly entered element is always at the front of ‘q1’ so that the pop operation just dequeues from ‘q1’. ‘q2’ is used to put every new element at the front of ‘q1’.

Try solving now

3. OS Questions

What is a kernel? (Learn)

Problem approach

A kernel is the core component of an operating system that acts as a bridge between the computer's hardware and software. It is responsible for managing system resources, providing essential services, and facilitating communication between software applications and the computer's hardware components. The kernel is loaded into the computer's memory during the boot process and remains in memory throughout the system's operation.

03
Round
Medium
Video Call
Duration60 minutes
Interview date22 Jul 2022
Coding problem3

1. Group Anagrams Together

Moderate
0/80
Asked in companies
Dell TechnologiesPayPalArcesium

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Try solving now

2. Reverse First K elements of Queue

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftOptumAmazon

You are given a QUEUE containing ‘N’ integers and an integer ‘K’. You need to reverse the order of the first ‘K’ elements of the queue, leaving the other elements in the same relative order.

You can only use the standard operations of the QUEUE STL:

1. enqueue(x) : Adds an item x to rear of the queue
2. dequeue() : Removes an item from front of the queue
3. size() : Returns number of elements in the queue.
4. front() : Finds the front element.
For Example:
Let the given queue be { 1, 2, 3, 4, 5 } and K be 3.
You need to reverse the first K integers of Queue which are 1, 2, and 3.
Thus, the final response will be { 3, 2, 1, 4, 5 }.
Try solving now

3. OS Question

What problem do we face in computer systems without OS? (Learn)

Problem approach

Operating systems (OS) play a fundamental role in managing and facilitating the interaction between computer hardware and software. Without an operating system, several critical issues and challenges arise in a computer system, making it impractical for most users. Some of the problems faced without an operating system include:

Lack of User Interface: An operating system provides a user interface that allows users to interact with the computer. Without an OS, there would be no graphical user interface (GUI) or command-line interface (CLI), making it challenging for users to interact with applications and the system.

No Hardware Abstraction: Operating systems provide hardware abstraction, allowing software applications to interact with hardware components without needing to understand the low-level details. Without an OS, every application would have to manage hardware interactions directly, leading to complex and error-prone code.

Limited Resource Management: An OS efficiently manages system resources such as CPU, memory, and storage. Without an OS, applications would need to manage these resources individually, leading to resource conflicts, inefficiencies, and potential system crashes.

No Multitasking or Process Management: Operating systems enable multitasking, allowing multiple processes to run concurrently. Without an OS, only one application or process could run at a time, severely limiting the system's efficiency and responsiveness.

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
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Optum
1392 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by Optum
1573 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Optum
994 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Optum
848 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes