UBS interview questions

107 questions from 20 candidate reports · 2017 to 2024

Online test → Technical → HR·85% entry level

CS fundamentals

Showing 32 of 99 reported in this area

Predict the output of given Java code snippets.
asked 2×easyPractice this →
Explain the different types of inheritance in Object-Oriented Programming.
asked 2×easyPractice this →
Answer conceptual questions on DBMS
asked oncemediumPractice this →
Explain B+ trees and indexing in databases
asked oncemediumPractice this →
Explain what PL/SQL is and write a trigger.
asked oncemediumPractice this →
How is JSX compiled and converted into JavaScript?
asked oncemediumPractice this →
Explain OS concepts such as Paging and Segmentation
asked oncemediumPractice this →
How do you find the 3rd highest salary in a database?
asked oncemediumPractice this →
Explain client-side rendering vs server-side rendering
asked oncemediumPractice this →
Explain what happens internally when you run a program
asked oncemediumPractice this →
How do you store and manage images in a web application?
asked oncemediumPractice this →
Explain inner classes, threads, and synchronization in Java.
asked oncemediumPractice this →
How can you ensure data security while using cloud services?
asked oncemediumPractice this →
Write an SQL query to find the highest salary department-wise
asked oncemediumPractice this →
Are you familiar with PL/SQL? Write a trigger and explain its use.
asked oncemediumPractice this →
What happens if an exception occurs in code and it is not handled?
asked oncemediumPractice this →
Design classes and implement constructors to satisfy given test cases.
asked oncemediumPractice this →
Explain database normalization and the difference between 3NF and BCNF
asked oncemediumPractice this →
Explain differences in architecture between popular backend frameworks
asked oncemediumPractice this →
Explain DBMS concepts including Normalization, Joins, and ACID properties
asked oncemediumPractice this →
Give real-life examples explaining the pillars of Object-Oriented Programming.
asked oncemediumPractice this →
Explain garbage collection in Java and how memory is freed if an exception occurs.
asked oncemediumPractice this →
Given a C++ OOP code snippet, predict the output and explain which constructors are called
asked oncemediumPractice this →
Which is better: an abstract class with all abstract methods or an interface? Explain why.
asked oncemediumPractice this →
Explain method overriding in Java, including what happens if a base class method is private.
asked oncemediumPractice this →
Explain why the String class in Java is immutable and demonstrate how to create an immutable class.
asked oncemediumPractice this →
Given multiple database tables, perform JOIN operations to derive the desired output for specific test case scenarios.
asked oncemediumPractice this →
Write an SQL query to display the author and the number of books written by them from a table having multivalued attributes.
asked oncemediumPractice this →
Explain JavaScript closures and predict the output of a function using closures (e.g., function ex(temp) { return [temp]; }).
asked oncemediumPractice this →
Explain the String class in Java and discuss collections like HashMap and Hashtable, including differences between HashMap and Hashtable.
asked oncemediumPractice this →
Compare C++ and Java
asked onceeasyPractice this →
Explain the core OOP concepts in Java
asked onceeasyPractice this →

DSA

Showing 18 of 40 reported in this area

Find the length of the longest substring with at most K normal characters.
asked 2×mediumPractice this →
Write code related to linked lists
asked oncemediumPractice this →
Optimize the performance of a given method
asked oncemediumPractice this →
Given a sequence of words, print all anagrams together
asked oncemediumPractice this →
Reverse a string using recursion without using any auxiliary memory
asked oncemediumPractice this →
Reverse a substring in a given string only if the substring exactly matches; otherwise return an error
asked oncemediumPractice this →
Given a linked list where the number of nodes is unknown, solve the problem using a pointer-based solution in one pass
asked oncemediumPractice this →
Given a string and a vector of strings, find the lexicographically smallest string that can be formed by rearranging the characters of the given string.
asked oncemediumPractice this →
Given a string and a vector of strings, find the lexicographically smallest string that can be created by rearranging the characters of the given string.
asked oncemediumPractice this →
Given a string s, remove duplicate letters so that every letter appears once and the resulting string is the smallest in lexicographical order among all possible results.
asked oncemediumPractice this →
Given a movement string consisting of 'C' (clockwise), 'A' (anticlockwise), and '?' (unknown), determine the maximum possible displacement from the origin by replacing '?' optimally.
asked oncemediumPractice this →
Given an array where each element represents the time taken by a task, allocate tasks to n persons such that each person gets nearly equal total work. Tasks must be assigned in sequence.
asked oncemediumPractice this →
Given a string consisting of characters 'A', 'C', and '?', where 'A' means anti-clockwise move, 'C' means clockwise move, and '?' can be replaced by either 'A' or 'C', determine how to replace '?' to achieve the maximum distance from the initial position after traversing the entire string.
asked oncemediumPractice this →
Matrix Traversal: Given a 4x4 matrix with initial energy 100, start from any cell in the first row and move to (i+1,j-1), (i+1,j), or (i+1,j+1) in each step until the last row. Energy decreases by the value of each visited cell. Find the maximum possible energy left at the end (energy can be negative).
asked oncemediumPractice this →
Count the minimum number of fountains to be activated to cover the entire garden
asked oncehardPractice this →
Given an array, preprocess it using prefix sums and answer multiple queries efficiently using binary search such that brute-force approaches lead to TLE.
asked oncehardPractice this →
Given an array representing the capacity of each machine, find the maximum network size such that each member in the network is adjacent, satisfies a minimum size, and meets a minimum threshold.
asked oncehardPractice this →
Implement a function to reverse a string
asked onceeasyPractice this →

Aptitude

Showing 1 of 8 reported in this area

Quantitative aptitude problem involving clock losing 2 minutes every hour.
asked onceeasyPractice this →

Puzzles

Showing 3 of 7 reported in this area

100 Doors Puzzle: There are 100 doors initially closed. After 100 passes toggling doors at multiples, which doors remain open?
asked oncemediumPractice this →
Four people with crossing times 1, 2, 7, and 10 need to cross a river with one torch; only two can cross at a time and one must return. Find the minimum total time.
asked oncemediumPractice this →
100 prisoners with red/black hats puzzle: Devise a strategy so that the maximum number of prisoners can guess their hat color correctly.
asked oncehardPractice this →

Behavioural

Showing 3 of 5 reported in this area

In a scenario where you are leading a team that is not responding well, how would you handle the situation?
asked oncemediumPractice this →
If you were the new employee unfamiliar with the tech stack and facing issues implementing a feature, how would you handle the situation?
asked oncemediumPractice this →
As a technical head, how would you handle a situation where a new employee is struggling to implement a feature due to lack of familiarity with the tech stack?
asked oncemediumPractice this →

System design

3 questions reported in this area

Design a database schema for an App Store.
asked oncemediumPractice this →
Design a RESTful API for a given scenario and explain different HTTP methods
asked oncemediumPractice this →
How would you approach building a system to predict a person's mood based on the type of songs they listen to?
asked oncemediumPractice this →

Showing 60 of 107 questions. Ranked by how often the same question came back across reports.

Practise a UBS-style interview

A spoken interview built from these questions, scored when you finish; the report is yours.

Start practising

Common questions

What questions does UBS ask?

Candidate interview reports most often cover CS fundamentals (61%) and DSA (25%).

How many rounds does UBS interview have?

Candidate interview reports show an average of 3.3 rounds per experience, with a typical sequence of Online test → Technical → HR. Individual interview paths can vary.

Is the UBS interview hard?

Among questions with a reported difficulty, the mix is easy 50%, medium 45%, hard 5%.

Keep reading