Expedia Group
20+ NatWest Group Interview Questions and Answers
Q1. Problem Statement: Largest Subarray with Equal Number of 0s and 1s
Given an array containing only 0s and 1s, determine the length of the longest contiguous subarray that has an equal number of 0s and 1s.
Input:...read more
Q2. Maximum Sum of Two Non-Overlapping Subarrays
Given an integer array ARR
and a positive integer K
, your objective is to find two non-overlapping subarrays (contiguous) of length K
each, such that their summed to...read more
Q3. Knight Probability in Chessboard
Calculate the probability that a knight remains on an N x N chessboard after making K moves. Initially, the knight is placed at a given position on the board. It can move in any...read more
Q4. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Q5. Gas Tank Problem Statement
You have a car with a gas tank of infinite capacity. There are 'N' gas stations located along a circular route, numbered from 0 to N-1. You begin your journey with an empty tank from ...read more
Q6. Remove Character from String Problem Statement
Given a string str
and a character 'X', develop a function to eliminate all instances of 'X' from str
and return the resulting string.
Input:
The first line contai...read more
Q7. String Rearrangement Problem Statement
You are given a string of lowercase characters. The objective is to rearrange (reorder) the string so that no two adjacent characters are identical.
Return the rearranged ...read more
Q8. LRU Cache Design Question
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwise, re...read more
Q9. Anagram Difference Problem Statement
Given two strings, 'STR1' and 'STR2', of equal lengths, determine the minimum number of manipulations required to make the two strings anagrams of each other.
Input:
The fir...read more
Q10. Binary Tree to Doubly Linked List
Transform a given Binary Tree into a Doubly Linked List.
Ensure that the nodes in the Doubly Linked List follow the Inorder Traversal of the Binary Tree.
Input:
The first line ...read more
Q11. Find Duplicates in an Array
Given an array ARR
of size 'N', where each integer is in the range from 0 to N - 1, identify all elements that appear more than once.
Return the duplicate elements in any order. If n...read more
Q12. Count Nodes within K-Distance Problem Statement
Given a connected, undirected, and acyclic graph where some nodes are marked and a positive integer 'K'. Your task is to return the count of nodes such that the d...read more
Q13. Problem: Deletion in Circular Linked List
You are provided with a Circular Linked List of integers and a specific integer, referred to as 'key'
.
Your task is to implement a function that locates the specified k...read more
Q14. Page Faults Identification Problem Statement
In computing, a page fault occurs when a process accesses a memory page that is not currently mapped by the memory management unit. To handle new pages being brought...read more
Q15. Closest Sum Problem Statement
Given an array of integers ARR
of size N
and an integer target
, find three integers in ARR
such that their sum is closest to the target
. If there are two closest sums, return the s...read more
Q16. Boundary Traversal of Binary Tree
Given a binary tree of integers, your task is to print the boundary nodes of this binary tree in an anti-clockwise direction starting from the root node.
Input:
The first line ...read more
Q17. Deletion in Circular Linked List Problem Statement
Given a Circular Singly Linked List of integers, and a specific value 'VAL', your task is to delete the first occurrence of this value in the linked list. If t...read more
Top HR Questions asked in NatWest Group
Interview Process at NatWest Group
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month