HSBC interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

HSBC
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
My life has had many ups and downs, but I somewhat managed to get admission to the college where I took computer science as a subject. Then, my coding journey started from here.
Application story
I applied through a friend's referral, a person who is currently working at this company, and then I received a mail for the assessment.
Why selected/rejected for the role?
I was rejected because I was not able to answer all my coding questions with lower time complexity.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Understand the Fundamentals: Ensure you have a strong grasp of fundamental programming concepts such as data structures, algorithms, and object-oriented programming. Review key topics like arrays, linked lists, stacks, queues, trees, sorting, searching, and graph algorithms.

Tip 2: Practice, Practice, Practice: Regular practice is essential for coding rounds. Solve a variety of coding problems from different sources, including coding websites, books, and online coding platforms. Start with easier problems and gradually move to more complex ones to build your problem-solving skills.

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

1. Include Leadership and Soft Skills:
Highlight skills such as teamwork, communication, problem-solving, and leadership.

2. White Space:
Use adequate white space to make the resume visually appealing and easy to read.

3. Be Honest:
Represent your experiences and skills accurately; avoid exaggerations.

4. Use PDF Format:
Save your resume as a PDF to preserve formatting across different devices.

5. Update Regularly:
Keep your resume updated with new skills, experiences, and accomplishments.

Remember, your resume is often the first impression employers have of you. Tailoring it to showcase your strengths and aligning it with the job you're applying for can significantly improve your chances of getting noticed.

Interview rounds

01
Round
Medium
Video Call
Duration45 minutes
Interview date26 Oct 2022
Coding problem2

The round was in the morning, around 10 A.M. .The round contains 2 coding questions to solve, and the time to solve it was 45 min.

1. Find Number Of Islands

Moderate
34m average time
60% success
0/80
Asked in companies
MicrosoftAmazonUber

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to another cell, if one cell lies immediately next to the other cell, in any of the eight directions (two vertical, two horizontal, and four diagonals).

A group of connected cells having value 1 is called an island. Your task is to find the number of such islands present in the matrix.

Problem approach

Use dfs, Consider this like number of unconnected components.

Try solving now

2. Kth largest element in the unsorted array

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

You are given an array consisting of 'N' distinct positive integers and a number 'K'. Your task is to find the kth largest element in the array.

Example:
Consider the array {2,1,5,6,3,8} and 'K' = 3, the sorted array will be {8, 6, 5, 3, 2, 1}, and the 3rd largest element will be 5.
Note:
1) Kth largest element in an array is the kth element of the array when sorted in non-increasing order. 

2) All the elements of the array are pairwise distinct.
Problem approach

You are provided with an array that contains a set of positive integers, each of which is unique. Additionally, you are given a specific integer value labeled as 'K'. Your primary objective is to determine the Kth largest element in the array. This means you need to identify the value that would be at the Kth position if the array were sorted in descending order.

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date27 Oct 2022
Coding problem2

1. Missing Numbers

Moderate
30m average time
70% success
0/80
Asked in companies
HSBCSterlite Technologies LimitedSamsung

You are given an array/list ‘BINARYNUMS’ that consists of ‘N’ distinct strings which represent all integers from 0 to N in binary representation except one integer. This integer between 0 to ‘N’ whose binary representation is not present in list ‘BINARYNUMS’ is called ‘Missing Integer’.

Your task is to find the binary representation of that ‘Missing Integer’. You should return a string that represents this ‘Missing Integer’ in binary without leading zeros.

Note

1. There will be no leading zeros in any string in the list ‘BINARYNUMS’.

Example:

Consider N = 5 and the list ‘binaryNums’=  [“0”, “01”, “010”, “100”, “101”].  This list consists of the binary representation of numbers [0, 1, 2, 4, 5]. Clearly, the missing number is 3 and its binary representation will be “11”. So you should return string “11”.
Problem approach

You have an array named 'ARR' containing positive integers, with each integer in the array being distinct. Your task is to identify and list all the numbers that fall within the range of the elements present in the array but are not actually part of the array. These missing elements should be displayed in ascending order.

Try solving now

2. Maximum In All Sub-Arrays Of Size K

Easy
10m average time
90% success
0/40
Asked in companies
DirectiCIS - Cyber InfrastructureSamsung

Given an array/list ‘ARR’ of integers and an integer ‘K’. You are supposed to return the maximum for every subarray of the given array of length ‘K’.

Note :
An array ‘B’ is a subarray of an array ‘A’ if ‘B’ that can be obtained by deletion of, several elements(possibly none) from the start of ‘A’ and several elements(possibly none) from the end of ‘A’. 
Problem approach

Given a list (or array) named 'arr' consisting of integers and an integer 'K', your goal is to generate a result that contains the maximum value for each contiguous subarray of length 'K' within the given 'arr'. In other words, you need to find the highest element within each window of 'K' consecutive elements as you slide through 'arr'.

Try solving now
03
Round
Easy
Video Call
Duration45 minutes
Interview date30 Oct 2022
Coding problem2

1. Intersection of Two Linked Lists

Easy
25m average time
73% success
0/40
Asked in companies
Hewlett Packard EnterpriseSamsungIntuit

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

You are given two singly linked lists of integers, which may have an intersection point. Your task is to return the first intersection node. If there is no intersection, return null.

Try solving now

2. Maximum Path Sum

Moderate
20m average time
80% success
0/80
Asked in companies
FacebookSamsungAmazon

You are given a binary tree with ‘N’ nodes.

Your task is to find the “Maximum Path Sum” for any path.

Note :

1. A ‘path’ is a sequence of adjacent pair nodes with an edge between them in the binary tree.
2. The ‘path’ doesn’t need to pass through the root.
3. The ‘path sum’ is the sum of the node’s data in that path. 
Problem approach

1) Find the maximum sum from leaf to root in the left subtree of X (we can use this post for this and the next steps).  
2) Find the maximum sum from leaf to root in the right subtree of X.  
3) Add the above two calculated values and X->data, then compare the sum with the maximum value obtained so far and update the maximum value.  
4) Return the maximum value.

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
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by HSBC
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by HSBC
1992 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by HSBC
2035 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by HSBC
1434 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3211 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2583 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes