UKG (Ultimate Kronos Group) interview experience Real time questions & tips from candidates to crack your interview

Senior Software Engineer

UKG (Ultimate Kronos Group)
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I started my preparation journey three months ago, focusing on Core Java, OOPs, and backend development. I consistently practiced Data Structures and Algorithms to sharpen my problem-solving skills. Solving coding questions regularly on Coding Ninjas helped me improve both my logic and speed.
Application story
I applied for the Senior Software Engineer position at UKG through its career portal. Later, I received an email from the recruiter to take the test.
Why selected/rejected for the role?
I was rejected in Round 1 – the Technical Discussion (Interview Round). The recruiter informed me that the feedback was not in my favor, and they would not be moving forward with my candidature. I would suggest that before attending your interview, make sure your fundamentals are 100% clear, and consider giving mock interviews to build practice and confidence.
Preparation
Duration: 3 months
Topics: Data Structures, Core Java, OOPs, Spring Framework, DBMS/SQL
Tip
Tip

Tip 1: Try to strengthen your fundamentals in Java, OOP, DBMS, and DSA.
Tip 2: Solve at least 150–200 important standard DSA questions on Coding Ninjas.
Tip 3: If you have experience working on a real project, make sure to thoroughly prepare for questions related to it.

Application process
Where: Other
Eligibility: Yes, 2–4 years of experience is required. (Salary Package: 15 LPA)
Resume Tip
Resume tip

Tip 1: Present your resume in the best possible way by highlighting your technical skills, experience, projects, achievements, and certifications.
Tip 2: Try to align your resume with the job description, but avoid including false information that could get you caught later.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date7 Mar 2025
Coding problem2

There were no specific timings. I was asked to complete it by March 7th, 07:31 PM IST. It was a virtual/online coding round.

1. Sub-array Sums Divisible By K

Moderate
25m average time
75% success
0/80
Asked in companies
MicrosoftUKG (Ultimate Kronos Group)BarRaiser

Given an array of integers of size ‘N’ and a positive integer ‘K’. Return the number of non-empty subarrays whose sum is divisible by K.

A subarray is a contiguous subset of an array.


For Example :
Consider an array of size four. The elements of the array are { -4, 5, 6, 1}. 
The value of K is 4. 
The subarrays whose sum is divisible by 4 are as  follows:
[ -4 ] 
[-4, 5, 6, 1] 
[ 5, 6, 1] 
Hence, there are three subarrays whose sum is divisible by 4. 
Problem approach
  • As I iterate through the array, I keep adding up the numbers—this becomes my running prefix sum.
  • For each prefix sum, I calculate prefixSum % k, which gives the remainder when the sum is divided by k.
  • If I’ve seen the same remainder before, it means there’s a subarray in between whose total sum is divisible by k.
  • So, I count how many times that remainder has already appeared.
  • I use a HashMap to keep track of how many times each remainder has occurred.
Try solving now

2. Longest Substring with At Most Two Distinct Characters

Moderate
0/80
Asked in companies
UKG (Ultimate Kronos Group)Flipkart limited

You are given a string ‘S’, you need to find the length of the longest substring that contains at most two distinct characters.

Note:

A string ‘B’ is a substring of a string ‘A’ if ‘B’ that can be obtained by deletion of, several characters(possibly none) from the start of ‘A’ and several characters(possibly none) from the end of ‘A’. 
Follow up :
Can you try to solve this problem in O(N) time and O(1) space.
Example :
If ‘S’ = “ninninja”

Then, “ninnin” is the longest substring that contains at most two distinct characters. We will print the length of this substring which is equal to 6.
Problem approach
  • I use the sliding window technique with two pointers (left and right).
  • I expand the window by moving the right pointer and keep track of character frequencies using a HashMap or an array.
  • If the number of distinct characters exceeds 2, I shrink the window from the left until there are at most 2 distinct characters again.
  • At each step, I update the maximum window size.
Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date4 Apr 2025
Coding problem4

This round took place in the afternoon (04:00 PM – 04:45 PM).
The interviewer joined the meeting on time.
He was friendly and created a comfortable environment.

1. Best Time to Buy and Sell Stock II

Moderate
22m average time
0/80
Asked in companies
FacebookOYOHCL Technologies

You have been given stock values/prices for N number of days. Every i-th day signifies the price of a stock on that day. Your task is to find the maximum profit which you can make by buying and selling the stocks.

 Note :
You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
Problem approach

I followed the approach below to solve this problem:

  • Initialized a variable profit to 0 to keep track of total earnings.
  • Iterated through the array of prices starting from the second day (index 1).
  • For each day, compared the price with the previous day's price:
  • If today's price is higher, it means I can make a profit by buying yesterday and selling today. So, I added the difference (prices[i] - prices[i - 1]) to profit.
  • After checking all days, returned the total profit as the maximum possible profit I could achieve.
Try solving now

2. DBMS

  • Write a SQL query to find the 7th max salary in the Employee table, department-wise.
  • What are joins? Types of joins? (Learn)
  • Difference between Primary and Foreign Key? (Learn)
  • SQL and NoSQL difference? (Learn)
Problem approach

Tip 1: Keep your DBMS fundamentals clear.
Tip 2: Practice SQL queries regularly.

3. Java Basics

  • Explain the features of Java 8. (Learn)
  • What is a functional interface? (Learn)
  • Explain the lifecycle of a thread. (Learn)
  • Java output-based question: Predict the output of the code.
  • Exception handling output-based question.
Problem approach

Tip 1: Keep your Java fundamentals clear.

Tip 2: Practice output-based questions.

4. Longest Subarray With Sum K

Moderate
30m average time
50% success
0/80
Asked in companies
OLX GroupIntuitRestoLabs

Ninja and his friend are playing a game of subarrays. They have an array ‘NUMS’ of length ‘N’. Ninja’s friend gives him an arbitrary integer ‘K’ and asks him to find the length of the longest subarray in which the sum of elements is equal to ‘K’.

Ninjas asks for your help to win this game. Find the length of the longest subarray in which the sum of elements is equal to ‘K’.

If there is no subarray whose sum is ‘K’ then you should return 0.

Example:
Input: ‘N’ = 5,  ‘K’ = 4, ‘NUMS’ = [ 1, 2, 1, 0, 1 ]

Output: 4

There are two subarrays with sum = 4, [1, 2, 1] and [2, 1, 0, 1]. Hence the length of the longest subarray with sum = 4 is 4.
Problem approach

I explained the following solution to him:

  • Initialize a variable maxLength to 0 to keep track of the longest subarray length found.
  • Use two nested loops to consider every possible subarray:
  • Outer loop i goes from 0 to the end of the array.
  • Inner loop j goes from i to the end of the array.
  • For each subarray from i to j, calculate the sum of elements.
  • If the sum equals k, check if the length (j - i + 1) is greater than maxLength. If yes, update maxLength.
  • After checking all subarrays, return maxLength.

It was an O(n²) solution, so he asked me for an optimized one, which I wasn't able to provide at that time.

Try solving now

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
Senior Software Engineer
3 rounds | 6 problems
Interviewed by UKG (Ultimate Kronos Group)
6928 views
1 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3319 views
0 comments
0 upvotes
Senior Software Engineer
4 rounds | 8 problems
Interviewed by UKG (Ultimate Kronos Group)
3088 views
0 comments
0 upvotes
Senior Software Engineer
4 rounds | 3 problems
Interviewed by UKG (Ultimate Kronos Group)
592 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Engineer
1 rounds | 6 problems
Interviewed by Arcesium
3734 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by Ernst & Young (EY)
4984 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by HCL Technologies
3013 views
3 comments
0 upvotes