Royal Bank of Scotland interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Royal Bank of Scotland
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
Basically, I completed my M.Tech at IIIT-Delhi. The programming culture there is so great that I started practicing programming in my first year. I have started with basic data structures and gradually increase the difficulty of various problems. In addition, I practiced a lot on different programming platforms and participated in programming competitions on different platforms. So this way I built up the confidence and prepared well for the placement.
Application story
I've applied through On Campus Placement at my college IIIT Delhi. Basically the first round was Online Assessment and get the shortlisting list next day. After that they have conducted Interview process and It was only 1 round in one day only. So keep yourself ready for whole day if you have same case as me.
Why selected/rejected for the role?
Actually, I did my best during the interview. However, at some point I feel that my answers did not satisfy the interviewer.I believe that was the reason for my rejection. I was a little nervous because the results would be decided in only one round. Therefore, before going to the interview, it is recommended to get a good rest, not to think about the result and perform well.
Preparation
Duration: 4 months
Topics: OOPS, Data Structures, Algorithms, Dynamic Programming, Technical Subjects - Operating System, Computer Network, Database Management System, Programming & Data Structure, Aptitude, Puzzles
Tip
Tip

Tip 1 : Prepared well for how to approach the solution of problem.
Tip 2 : Start with bruit-force approach and gradually optimize further.

Application process
Where: Campus
Eligibility: 6.5 + cgpa
Resume Tip
Resume tip

Tip 1 : Whatever you write in resume, make sure you are enough confident and ready to explain it in a detail.
Tip 2 : Keep your resume as simple as possible. Don't go with highly designed format.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date12 Aug 2022
Coding problem3

It was in the evening 08:00 PM. Environment was quite good and no any additional disturbance was there. Internet connectivity was also decent and I was very confident about this round.

1. Optimal Ordering Of Tasks

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonalibabaIon Group

You are given ‘N’ tasks. Each task has its own duration and deadline stored in array/list 'ARR'. You have to do all the tasks. Reward earned by doing a task is ‘deadline of the task’ - ‘time when the task is done’.

You have to order the tasks in such a way that the sum of rewards is maximized and find the maximum sum of the reward.

Note :

1. The time starts from zero. 
2. Before completing one task another task can not be started. 
3. The reward for doing a task can be negative. 
Try solving now

2. Maximum number in K swaps

Hard
15m average time
85% success
0/120
Asked in companies
AmdocsRoyal Bank of Scotland

You are given two positive integers M and K, your task is to find the maximum integer possible, by swapping at most K digits of M.

You can perform a maximum of K swap operations. If the integer becomes maximum in less than K operations, you can stop and return the output.

Note:- For simplicity, you will be provided with the integer M in the form of a ‘string’ data type for easier swap operations.

Example:-
INPUT : M = 123 , K = 1
OUTPUT: 312

In the above example, K = 1, hence only 1 swap operation is available.
Operation 1: Swap 1 with 3 so the integer becomes 312

INPUT : M = 567392 , K = 3
OUTPUT: 976532

In the above example, K = 3, hence a maximum of 3 swap operation available
Operation 1: Swap 5 with 9 so the integer becomes 967352
Operation 2: Swap 6 with 7 so the integer becomes 976352
Operation 3: Swap 3 with 5 so the integer becomes 976532

INPUT : M = 751, K = 2
OUTPUT: 751

In the above example, No swaps are required as it is already the maximum possible integer with that set of digits.

INPUT : M = 3849 , K = 0
OUTPUT: 3849

In the above example, K = 0, hence no swap operations are available.
Problem approach

- Create a global variable that will store the maximum string or number.
- Define a recursive function that takes the string as a number, the value of k, and the current index.
- Find the index of the maximum element in the range current index to end.
- if the index of the maximum element is not equal to the current index then decrement the value of k.
- Run a loop from the current index to the end of the array
- If the ith digit is equal to the maximum element
- Swap the ith and element at the current index and check if the string is now maximum and update the 
maximum string.
- Call the function recursively with parameters: string and k.
- Now again swap back the ith and element at the current index.

Try solving now

3. Find Four Elements That Sums To A Given Value

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonOYOHCL Technologies

You are given an array/list 'ARR' of ‘N’ integers and an integer value ‘TARGET’. You need to check whether there exist four numbers (ARR[i], ARR[j], ARR[k], ARR[l]) such that (0 <= i < j < k < l < N) and ARR[i] + ARR[j] + ARR[k] + ARR[l] = 'TARGET'.

Note:
1. All four numbers should exist at different indices in the given array.
2. The answer is case-sensitive.
Problem approach

- Initialize the counter count to store the total quadruplets with the given sum S and a map to store all possible 
sums for the first two elements of each possible quadruplet.

- Traverse the given array over the range [0, N – 1] using the variable i where arr[i] is the fixed 3rd element.

- Then for each element arr[i] in the above step, traverse the given array over the range [i + 1, N – 1] using the 
variable j and increment the counter count by map[arr[i] + arr[j]].

- After traversing from the above loop, for each element arr[i], traverse the array arr[] from j = 0 to i – 1 and 
increment the frequency of any sum arr[i] + arr[j] of the first two elements of any possible quadruplet by 1 i.e., 
increment map[arr[i] + arr[j]] by 1.

- Repeat the above steps for each element arr[i] and then print the counter count as the total number of 
quadruplets with the given sum S.

Try solving now
02
Round
Medium
Video Call
Duration80 minutes
Interview date18 Aug 2022
Coding problem3

1. Implementation: HashMap

Easy
30m average time
90% success
0/40
Asked in companies
American ExpressPayPaleBay

Design a data structure that stores a mapping of a key to a given value and supports the following operations in constant time.

1. INSERT(key, value): Inserts an integer value to the data structure against a string type key if not already present. If already present, it updates the value of the key with the new one. This function will not return anything.

2. DELETE(key): Removes the key from the data structure if present. It doesn't return anything.

3. SEARCH(key): It searches for the key in the data structure. In case it is present, return true. Otherwise, return false.

4. GET(key): It returns the integer value stored against the given key. If the key is not present, return -1. 

5. GET_SIZE(): It returns an integer value denoting the size of the data structure. 

6. IS_EMPTY(): It returns a boolean value, denoting whether the data structure is empty or not. 
Note :
1. Key is always a string value.
2. Value can never be -1.
Operations Performed :
First(Denoted by integer value 1):  Insertion to the Data Structure. It is done in a pair of (key, value).

Second(Denoted by integer value 2):  Deletion of a key from the Data Structure.

Third(Denoted by integer value 3): Search a given key in the Data Structure.

Fourth(Denoted by integer value 4): Retrieve the value for a given key from the Data Structure.

Fifth(Denoted by integer value 5): Retrieve the size of the Data Structure.

Sixth(Denoted by integer value 6): Retrieve whether the Data Structure is empty or not.
Try solving now

2. Puzzle Question

There are two jugs each of 4 and 3 liters respectively , without any measuring marks. how many minimum steps are required to have 2 liters of water into the 4 litre jug (the jugs can be filled any number of times with water, and they can be emptied any number of times).

Problem approach

As we want 2litre water in a 4liter mug, this can be achieved by the following last states:
1. Having 1litre in a 3litre mug 
2. Having 2litre in 4litre mug

1. First one as easy to think as the difference between the mugs (4-3 =1) 

Step 1 : Fill 4-litre jug with water completely 
Step 2 : Empty water from 4-litre jug into 3-litre (leaving 1L in 4litre mug and 3L in 3 litre mug)
Step 3 : Empty water from 3-litre
Step 4 : pour water from 4-litre jug into 3-litre jug (leaving 0L in 4litre mug and 1L in 3 litre mug)
Step 5 : Fill 4-litre jug with water completely again.
Step 6: Transfer water of 4-litre jug to 3-litre jug, resulting in 2 litre water in 4-litre jug. 

2. Second approach:
Step 1 : Fill 3-litre jug with water completely 
Step 2 : Empty water from 3-litre jug into 4-litre 
Step 3 : Again, fill 3-litre jug with water completely 
Step 4 : And pour water from 3-litre jug into 4-litre jug until 4-litre jug becomes full 
Step 5 : Empty the 4-litre jug. Now, we are left with 2 litre water in 3-litre jug and 4-litre jug is empty. 
Step 6: Transfer water of 3-litre jug to 4-litre jug, resulting in 2 litre water in 4-litre jug.

3. Technical Questions

- What is good thing about you?
- Why do you want to join RBS?
- What do you know about our company?
- Which are the latest technology available in the world?
- What are your hobbies and the reason?
- What motivates you to join our company?

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
SDE - Intern
3 rounds | 4 problems
Interviewed by Royal Bank of Scotland
1269 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by Royal Bank of Scotland
978 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 4 problems
Interviewed by Royal Bank of Scotland
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7874 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes