HSBC Coding Questions

Top HSBC Coding Questions

In this page you will find out all the insights on HSBC Hiring Process. Including Important Dates, Job Description, Eligibility Criteria, Online Aptitude and Coding Questions and also Company – Specific Assessments.
hsbc coding questions

About HSBC

HSBC is the world’s largest banking and financial services company. They globally provide various services like: Commercial and Personal Banking, Global Marketing and Banking Services.  In 1987, HSBC gave the greatest contribution in development of Banking Industry of India by providing India’s First ATM .

HSBC Recruitment Process

The Online Assessment consists of 2 sections : 

  1. Aptitude + Technical Assessment
  2. Coding Test (After clearing  the 1st Round)

We have even tabulated some more information for your reference and understanding.

PointsImportant Informations
Position :
  • Trainee Software Engineer
Course :
  • Eligible Batch – 2023
  • B.Tech – CSE, CS, IT and CSIT
Eligibility Criteria / Academic Qualification Required :
  • Minimum 60 % throughout 10th, 12th and Graduation.
  • Should not have any current backlog during hiring / onboarding process.
Cost to Company (CTC)
  •  9 LPA
Selection Process :
  • Applying online on AON.
  • Online Aptitude and Coding Assessments
  • Online HSBC Values Assessment Pre – Placement Talks
  • Technical and H.R Interview
Joining Location :Pune / Hyderabad / Bangalore [Work From Office]

Details of  HSBC Online Assessment :

Topics Time
Aptitude + Techinal Questions 75 Minutes
Coding Test 30 Minutes

More details related to this JobPost

  1. Required Strong fundamentals in Software Development Engineering with proficiency at least in 1 Object Oriented Programming Language such as Python, Java, etc.
  2. Should have command in OS like Android, Linux & Databases like RDBMS and no – SQL.

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Sample HSBC Coding Questions With Solutions

Question 1 : Weird Terminal

Problem Statement : 

Here is a weird problem in Susan’s terminal. He can not write more than two words each line, if she writes more than two, it takes only 2 words and the rest are not taken. So she needs to use enter and put the rest in a new line. For a given paragraph, how many lines are needed to be written in Susan’s terminal?

Input Format:

A string as the text to input in the terminal

Output Format:

Number of lines written.

Constraints:

Number of words <=10^7

Sample Input:

How long do you have to sit dear ?

Sample Output:

4

Explanation:

The writing will be:

How long

Do you

Have to

Sit dear ?

 

Question 2 : Password Hacker

Problem statement :

Elliot made a KeyLogger for his friend Romero, so that he can see the passwords of his friend. Keylogger is a software that can tell you the buttons pressed in the keyboard without the consent of the user, and hence unethical. Elliot made it to hack Romero’s passwords. The one problem is, Romero writes the passwords in lowercase characters only, and the keylogger only takes the values of the keys. Like, for a it takes 1, for b 2, and for z 26. For a given number Elliot produces all combinations of passwords in a dictionary and starts a dictionary based password attack. For a given number, print all the possible passwords in a lexicographic order.

Input Format:

One line, denoting the value given by the keylogger

Output Format:

All possible combinations of keyloggers in new lines are lexicographically ordered.

Constraints:

2<=Number of digit in input<=1000

Sample Input:

1234

Sample Output:

abcd

axd

Mcd

Explanation:

For 12, you can take 1,2 that is ab, or you can take l.

Question 3 : Find the sequence sum

Problem statement :

Rohit loves to play with sequences so he has given you a sequence to solve. To prove to him that you are a good coder, you accept the challenge. Find the sum of the sequence. Given three integers i,j,k find  i+(i+1)+(i+2)+(i+3)…j+(j-1)+(j-2)+(j-3)……..k 

CONSTRAINTS:

  • -108<=i,j,k<=108
  • i,k<=j

SAMPLE CASE0 :

0   → i=0

5  → j=5

-1  → k=-1

SAMPLE OUTPUT 0:

24

EXPLANATION 0:

0+1+2+3+4+5+4+3+2+1+0-1 =24

Question 4 :Picking Tickets

Problem statement :

There are consecutive lighthouses present in the x axis of a plane.You are given n, which represents the the number of light position and x coordinate array which represent the position of the lighthouses.You have to find maximum lighthouses which have absolute difference less than or equal to 1 between adjacent numbers.

CONSTRAINTS

  • 1<=n<105
  • 1<=tickets[i]<=109

SAMPLE CASE 0:

SAMPLE INPUT 0:

4  → tickets[] size=4

4   → tickets[] =[4,13,2,3]

13

 2

3

SAMPLE OUTPUT 0:

3

EXPLANATION

There are 2 subsequences of tickets that contain consecutive integers when sorted. {2,3,4} and {13} . These sequences has m values as 3 and 1 respectively . return maximum value of m which is 3.

 

Question 5 :Fantasy Premier League

Problem statement :

Ramesh loves to bet and also loves football, so he created a fantasy football team in FPL. He chose Rashford in his team. You are given a string in which each index denotes a match and it consists of characters: Y, G, A. G means goal scored and the player is awarded 4 points, for A 3 points, and for every Y, 1 point is deducted.

Calculate the points scored by rashford

Constraints:

  • 0<n<105

Sample case 0:

Sample input 0:

EHH → erica=”EHH”

EME → bob=”EME”

Sample output 0:

Erica

Explanation 0:

Erica’s score is , 1+5+5=11

Bob’s score is , 1+3+1=5

So Erica is the winner

FAQs on HSBC Coding Questions with Solutions

Question 1: What type of questions are asked in the HSBC Online Assessment ?

HSBC Online Assessment consists of an online test which has aptitude and technical questions and a coding test.

Question 2: Is HSBC exam difficult?

HSBC exam is a little tricky, but with proper practice and preparation it can be cracked easily by anyone.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription