Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by UBS Team. If you also belong to the team, you can get access from here

UBS Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

UBS C Developer Interview Questions, Process, and Tips

Updated 1 Nov 2021

UBS C Developer Interview Experiences

1 interview found

C Developer Interview Questions & Answers

user image Anonymous

posted on 1 Nov 2021

I was interviewed in Jul 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 120 minutes
Round difficulty - Easy

2 coding questions and 10 MCQ based on find output of code and some aptitude.

  • Q1. 

    String Transformation Problem

    Given a string (STR) of length N, you are tasked to create a new string through the following method:

    Select the smallest character from the first K characters of STR, remov...

  • Ans. Brute Force Approach
    • Create a new “answer” string that will contain the modified string
    • While the input string's length is greater than 0
      • Find the minimum character in the first K characters of the string (or the entire string if its length is less than K)
      • Append that character to the “answer” string
      • Remove that character from the input string
    • Return the “answer” string
    Space Complexity: O(1)Explanation:

    O(1)

     

    Since we ar...

  • Answered Anonymously
  • Q2. 

    Find Maximum Number by At-most K Swaps

    Given an array of non-negative integers representing the digits of a number and an integer 'K', calculate the maximum possible number by swapping its digits up to 'K...

  • Ans. Brute Force

    The idea is to generate all the possible numbers by trying all the possible combinations of indices at most ‘K’ times. We will do this task with a recursive function and each time we swap two indices we will decrease the value of ‘K’ by 1. So base case is when ‘K’ is equal to zero and each time when we swap indices we will check whether the current number is the maximum possible or not.

     

    Here is the algo...

  • Answered Anonymously
Round 2 - Face to Face 

(1 Question)

Round duration - 45 minutes
Round difficulty - Easy

C++ questions, one coding question, some python question

  • Q1. 

    Merge K Sorted Arrays Problem Statement

    Given 'K' different arrays that are individually sorted in ascending order, merge all these arrays into a single array that is also sorted in ascending order.

    Inpu...

  • Ans. Sorting

     

    1. Create an output array ‘RESULT’.
    2. Traverse all the given arrays from start to end and insert all the elements in the output array ‘RESULT’.
    3. Sort the ‘RESULT’ and return it.
    Space Complexity: O(2^n)Explanation:

    O(N * K), Where ‘K’ is the number of arrays and ‘N’ is the average number of elements in every array.

     

    We are using an array/list of size O(N * K) to store all the elements of the ‘K’ arrays/lists. T...

  • Answered Anonymously
Round 3 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Easy

C++ related questions, coding questions, past internship experience,some python questions

  • Q1. 

    Sort 0 1 2 Problem Statement

    Given an integer array arr of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.

    Input:

    The first line contains an integer 'T' representing the n...
  • Ans. Sorting

    Use any good sorting algorithm like Merge Sort, Quick Sort or inbuilt sorting function of different languages.

    • Sort the Array and just return.
    Space Complexity: O(1)Explanation:

    O(1), As we are using constant space.

    Time Complexity: O(nlogn)Explanation:

    O(N*log(N)), where ‘N’ is the size of the array.

    We are using inbuilt sort algorithm which has Overall Time Complexity O(N*log(N))

  • Answered Anonymously
  • Q2. 

    Move Zeroes to End Problem Statement

    Given an unsorted array of integers, modify the array such that all the zeroes are moved to the end, while maintaining the order of non-zero elements as they appear or...

  • Ans. Naive Approach

    Hint: can you think of separating zero elements and non-zero elements in different containers?


     

    Approach : 


     

    We can create a new array of integers. As soon as we find a non-zero element, we can directly insert it into our new array. After that, we can insert all the left zero’s. 


     

    We can easily calculate the number of left zeroes as : 

     

    Size of original array = size of new a...

  • Answered Anonymously
Round 4 - Face to Face 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Data Structure questions, trees questions.

  • Q1. 

    Preorder Traversal of a BST Problem Statement

    Given an array PREORDER representing the preorder traversal of a Binary Search Tree (BST) with N nodes, construct the original BST.

    Each element in the given...

  • Ans. Brute Force Approach

    We have a simple Brute Force solution for this problem. We will traverse the PREORDER array, find the left subtree and right subtree and then recursively construct the tree as follows-

     

    • The first element of the preorder traversal corresponds to the root of BST.
    • We will find the index ‘SPLIT’ of the first element in the given traversal which is greater than the root node i.e PREORDER[‘SPLIT’] >...
  • Answered Anonymously
  • Q2. 

    BST Node Deletion Problem

    Given a binary search tree (BST) and a key value K, your task is to delete the node with value K. It is guaranteed that a node with value K exists in the BST.

    Explanation:

    A bi...

  • Ans. Recursive Solution - 1
    • There can be three cases when a node is to be deleted:
      • The node has 0 children/ node is a leaf. In this case, simply remove the node from the tree.
      • The node has 1 child. In this case, delete the node and copy the child to this node.
      • The node has 2 children. In this case, delete the node and copy the inorder successor to this node. (You could have also used the inorder predecessor).
    • To find the inorder...
  • Answered Anonymously

Interview Preparation Tips

Professional and academic backgroundI applied for the job as C++ Developer in PuneEligibility criteria2021 passout, 7 CGPA aboveCredit Suisse interview preparation:Topics to prepare for the interview - C++, Python, Arrays, Trees, Data Structures, AlgorithmsTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : Have good knowledge of C++
Tip 2 : Practice easy, medium questions from leetcode mostly arrays, stack, trees.
Tip 3 : Have some knowledge of Python

Application resume tips for other job seekers

Tip 1 : Have some achievements like coding contest ratings, etc
Tip 2 : Have 1 or 2 good projects on Web Development or Machine Learning or any internship experience is even better.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview questions from similar companies

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

There were three coding questions.

Round 2 - Technical 

(5 Questions)

  • Q1. Could you provide a thorough explanation of the project?
  • Q2. OOps Concepts and question from the technical subjects
  • Q3. Why Spring Boot
  • Q4. JWT Authentication
  • Q5. Docker and Kubernetes
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-

I applied via Campus Placement

Round 1 - Technical 

(2 Questions)

  • Q1. This was for internship. The first questions were 10 questions based on guessing output of c program
  • Q2. 2 coding questions with easy to medium difficulty based on strings and mathematical knowledge
Round 2 - Interview 

(1 Question)

  • Q1. This was a virtual interview round which had basic HR type questions.
Round 3 - Hackathon 

(1 Question)

  • Q1. This was code for good hackathon
Interview experience
3
Average
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.

Round 1 - Technical 

(3 Questions)

  • Q1. They grind u in javascript,typescript
  • Q2. Html css, angular
  • Q3. Deep preparation needed

Interview Preparation Tips

Interview preparation tips for other job seekers - Not an easy interview
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
-

I applied via Naukri.com and was interviewed in Sep 2024. There were 2 interview rounds.

Round 1 - Technical 

(2 Questions)

  • Q1. Basic questions about sql and PLSQL topics
  • Q2. Scenario based questions and write few sql queries
Round 2 - Technical 

(2 Questions)

  • Q1. Performance tuning related questions
  • Q2. Explain project details
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Question Related to the DP and the Graph

Round 2 - Technical 

(2 Questions)

  • Q1. Kth Max Element in a Array
  • Ans. 

    Find the Kth maximum element in an array of strings.

    • Sort the array in descending order.

    • Return the element at index K-1.

  • Answered by AI
  • Q2. Coin Change and optimization through DP
  • Ans. 

    Coin change problem can be solved using dynamic programming to find the minimum number of coins needed to make a certain amount of change.

    • Use dynamic programming to build up solutions for smaller subproblems

    • Start by initializing an array to store the minimum number of coins needed for each amount from 0 to the target amount

    • Iterate through each coin denomination and update the array with the minimum number of coins need

  • Answered by AI
Round 3 - HR 

(2 Questions)

  • Q1. Project include in your Resume
  • Q2. HR common question

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Aptitude Test 

MCQ test consisting of 70 mcqs in 75 minutes from aptitude english and cs fundamentals. If cleared next paper 2 coding qs medium level

Round 2 - Technical 

(2 Questions)

  • Q1. Two sum leetcode problem
  • Q2. What problems you faced in your project
  • Ans. 

    I faced challenges with integrating third-party APIs and debugging complex logic.

    • Difficulty in understanding and implementing third-party APIs

    • Issues with data synchronization between different systems

    • Troubleshooting complex logic errors

    • Managing dependencies and version conflicts

    • Time constraints affecting problem-solving

  • Answered by AI
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-

I applied via Campus Placement

Round 1 - Coding Test 

DP graphs strings it was good

Round 2 - Technical 

(2 Questions)

  • Q1. Reverse a linkded list
  • Ans. 

    Reverse a linked list by changing the direction of pointers

    • Start with three pointers: current, previous, and next

    • Iterate through the list, updating pointers to reverse the direction

    • Return the new head of the reversed list

  • Answered by AI
  • Q2. Print fibonacci series
  • Ans. 

    The Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.

    • Start with two variables initialized to 0 and 1

    • Loop through desired number of iterations, adding the previous two numbers to get the next number

    • Print or store each number in the series

  • Answered by AI

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - HR 

(2 Questions)

  • Q1. Why do you want to switch
  • Ans. 

    I want to switch to explore new technologies and challenges in a different industry.

    • Interested in learning new skills and technologies

    • Seeking new challenges and opportunities for growth

    • Want to explore different industry perspectives

  • Answered by AI
  • Q2. Salry expectations
Round 2 - Technical 

(2 Questions)

  • Q1. Question on oop concepts
  • Q2. Coding questions
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Asked about data structures

Round 2 - Coding Test 

Asked about java programmes

Round 3 - HR 

(2 Questions)

  • Q1. Tell me about your self
  • Ans. 

    I am a passionate software developer with 5 years of experience in developing web applications using Java, Spring, and Angular.

    • 5 years of experience in software development

    • Proficient in Java, Spring, and Angular

    • Passionate about coding and problem-solving

  • Answered by AI
  • Q2. Are you ready to relocate
  • Ans. 

    Yes, I am open to relocating for the right opportunity.

    • I am willing to relocate for the right job opportunity that aligns with my career goals.

    • I have experience moving for previous jobs and am comfortable with the process.

    • I am excited about the possibility of exploring a new city or country and experiencing a different culture.

  • Answered by AI

Tell us how to improve this page.

Interview Questions from Similar Companies

Citicorp Interview Questions
3.7
 • 564 Interviews
Wells Fargo Interview Questions
3.8
 • 563 Interviews
HSBC Group Interview Questions
4.0
 • 484 Interviews
Goldman Sachs Interview Questions
3.5
 • 376 Interviews
Deutsche Bank Interview Questions
3.9
 • 361 Interviews
American Express Interview Questions
4.2
 • 358 Interviews
BNY Interview Questions
3.9
 • 340 Interviews
Morgan Stanley Interview Questions
3.7
 • 291 Interviews
Barclays Interview Questions
3.8
 • 269 Interviews
View all
Associate Director
3.3k salaries
unlock blur

₹14.8 L/yr - ₹53.5 L/yr

Assistant Vice President
2.3k salaries
unlock blur

₹16 L/yr - ₹49 L/yr

Authorized Officer
1.7k salaries
unlock blur

₹9.7 L/yr - ₹28 L/yr

Exempt NON Officer
1.5k salaries
unlock blur

₹7 L/yr - ₹29.1 L/yr

ENO
1.4k salaries
unlock blur

₹7 L/yr - ₹25 L/yr

Explore more salaries
Compare UBS with

Morgan Stanley

3.7
Compare

Goldman Sachs

3.5
Compare

JPMorgan Chase & Co.

4.0
Compare

Deutsche Bank

3.9
Compare
Did you find this page helpful?
Yes No
write
Share an Interview