Add office photos
HSBC Group logo
Employer?
Claim Account for FREE

HSBC Group

3.9
based on 4.8k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Software Developer
Fresher
Clear (1)

10+ HSBC Group Software Developer Interview Questions and Answers

Updated 30 Aug 2024

Q1. Contains Duplicate Problem Statement

Given an array of integers ARR and an integer K, determine if there exist two distinct indices i and j such that ARR[i] == ARR[j] and | i - j | <= K.

Input:

The first line c...read more
Ans.

Given an array of integers and an integer K, determine if there exist two distinct indices i and j such that ARR[i] == ARR[j] and | i - j | <= K.

  • Iterate through the array and keep track of the indices of each element using a hashmap.

  • Check if the current element already exists in the hashmap within a distance of K.

  • Return 'Yes' if a pair of such indices exists, otherwise return 'No'.

Add your answer
right arrow
Q2. Which data structures are used for implementing an LRU cache?
Ans.

The data structures used for implementing an LRU cache are doubly linked list and hash map.

  • Doubly linked list is used to maintain the order of recently used elements.

  • Hash map is used for fast lookups to check if an element is present in the cache or not.

  • When a new element is accessed, it is moved to the front of the linked list to indicate it as the most recently used.

View 1 answer
right arrow
HSBC Group Software Developer Interview Questions and Answers for Freshers
illustration image
Q3. What do you understand by functional dependency and transitive dependency in DBMS?
Ans.

Functional dependency is a relationship between attributes in a database table, while transitive dependency occurs when an attribute is functionally dependent on another attribute.

  • Functional dependency: A determines B, where the value of A uniquely determines the value of B.

  • Transitive dependency: A determines B, and B determines C, therefore A indirectly determines C.

  • Example of functional dependency: Employee ID determines Employee Name.

  • Example of transitive dependency: Emplo...read more

Add your answer
right arrow
Q4. What is normalization and what are the different types of normalization?
Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization is used to eliminate data redundancy and ensure data integrity.

  • There are different normal forms such as 1NF, 2NF, 3NF, BCNF, and 4NF.

  • Each normal form has specific rules to follow in order to achieve it.

  • For example, 1NF ensures that each column contains atomic values, 2NF eliminates partial dependencies, and 3NF removes transitive dependencies.

Add your answer
right arrow
Discover HSBC Group interview dos and don'ts from real experiences
Q5. What is a bootstrap program in an operating system?
Ans.

A bootstrap program is a small program that initializes the operating system during the boot process.

  • Bootstrap program is the first code that runs when a computer is turned on.

  • It loads the operating system kernel into memory and starts its execution.

  • It performs hardware checks, sets up memory, and initializes system components.

  • Examples include GRUB for Linux and NTLDR for Windows.

View 1 answer
right arrow

Q6. What is DBMS and RDBMS and difference between them?

Ans.

DBMS stands for Database Management System, while RDBMS stands for Relational Database Management System. RDBMS is a type of DBMS.

  • DBMS is a software system that allows users to define, create, maintain and control access to the database.

  • RDBMS is a type of DBMS that stores data in a structured format using tables with rows and columns.

  • RDBMS enforces a set of rules called ACID properties to ensure data integrity, while DBMS may not necessarily enforce these rules.

  • Examples of DB...read more

Add your answer
right arrow
Are these interview questions helpful?

Q7. What are the 4 pillars of OOPs?

Ans.

Encapsulation, Inheritance, Polymorphism, Abstraction

  • Encapsulation: Bundling data and methods that operate on the data into a single unit

  • Inheritance: Ability of a class to inherit properties and behavior from another class

  • Polymorphism: Ability to present the same interface for different data types

  • Abstraction: Hiding the complex implementation details and showing only the necessary features

Add your answer
right arrow

Q8. What is Object oriented programming?

Ans.

Object oriented programming is a programming paradigm based on the concept of objects, which can contain data and code.

  • Objects are instances of classes, which define the structure and behavior of the objects.

  • Encapsulation, inheritance, and polymorphism are key principles of object oriented programming.

  • Example: Inheritance allows a class to inherit properties and methods from another class.

  • Example: Encapsulation hides the internal state of an object and only exposes necessary ...read more

View 1 answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop
Q9. How is a stack different from a queue?
Ans.

A stack follows Last In First Out (LIFO) order while a queue follows First In First Out (FIFO) order.

  • Stack: elements are added and removed from the top (like a stack of plates)

  • Queue: elements are added at the rear and removed from the front (like a line of people)

  • Stack: push() and pop() operations

  • Queue: enqueue() and dequeue() operations

  • Example: Undo functionality in text editors (stack) vs. printer queue (queue)

Add your answer
right arrow

Q10. Write down code implementing all 4 pillars of OOPs.

Ans.

Code implementing all 4 pillars of OOPs

  • Encapsulation: Encapsulate data within classes and provide public methods to access and modify the data.

  • Inheritance: Create a hierarchy of classes where child classes inherit attributes and methods from parent classes.

  • Polymorphism: Allow objects of different classes to be treated as objects of a common superclass through method overriding and overloading.

  • Abstraction: Hide complex implementation details and only show the necessary feature...read more

Add your answer
right arrow

Q11. What is SQL and who its different from mySQL?

Ans.

SQL is a standard language for managing databases, while MySQL is a specific open-source relational database management system.

  • SQL stands for Structured Query Language and is used to communicate with databases.

  • SQL is a standard language that can be used with various database management systems.

  • MySQL is a specific open-source relational database management system that uses SQL.

  • MySQL is one of the most popular database management systems that uses SQL for querying and managing ...read more

Add your answer
right arrow

Q12. Write a code to find the 2nd largest element in an array.

Ans.

Code to find the 2nd largest element in an array

  • Sort the array in descending order and return the element at index 1

  • Iterate through the array and keep track of the two largest elements

  • Handle edge cases like arrays with less than 2 elements

Add your answer
right arrow

Q13. Difference between C and C++?

Ans.

C is a procedural programming language while C++ is an object-oriented programming language.

  • C is a procedural programming language, while C++ supports both procedural and object-oriented programming.

  • C does not have classes and objects, while C++ does.

  • C does not support function overloading, while C++ does.

  • C does not have exception handling, while C++ does.

  • C does not have namespaces, while C++ does.

View 1 answer
right arrow

Q14. Difference between Delete, Truncate and Drop?

Ans.

Delete removes specific rows from a table, Truncate removes all rows from a table, and Drop removes the table itself.

  • Delete is a DML command that removes specific rows from a table based on a condition.

  • Truncate is a DDL command that removes all rows from a table but keeps the table structure.

  • Drop is a DDL command that removes the entire table along with its structure.

View 1 answer
right arrow

Q15. What is merge sort and its Algorithm ?

Ans.

Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts them recursively, and then merges them.

  • Divide the input array into two halves

  • Recursively sort each half

  • Merge the sorted halves back together

Add your answer
right arrow

Q16. Different kind of Joins in DBMS ?

Ans.

Different types of joins in DBMS include inner join, outer join, left join, right join, and full join.

  • Inner join: Returns rows when there is a match in both tables.

  • Outer join: Returns all rows from one table and only matching rows from the other table.

  • Left join: Returns all rows from the left table and the matched rows from the right table.

  • Right join: Returns all rows from the right table and the matched rows from the left table.

  • Full join: Returns rows when there is a match i...read more

Add your answer
right arrow

Q17. Difference between Stacks and Queues?

Ans.

Stacks are Last In First Out (LIFO) data structures, while Queues are First In First Out (FIFO) data structures.

  • Stacks: Elements are added and removed from the same end, like a stack of plates. Example: Undo feature in text editors.

  • Queues: Elements are added at the rear and removed from the front, like a line of people waiting. Example: Print queue in a printer.

Add your answer
right arrow

Q18. Throw vs throw ex

Ans.

throw vs throw ex is used in exception handling in C#

  • throw is used to rethrow the current exception without losing the original stack trace

  • throw ex is used to throw a new exception while preserving the original exception information

  • It is recommended to use throw without specifying ex to avoid losing important exception details

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at HSBC Group Software Developer

based on 9 interviews
3 Interview rounds
Resume Shortlist Round
Aptitude Test Round
Coding Test Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

Nagarro Logo
4.0
 • 105 Interview Questions
Capita Logo
3.6
 • 19 Interview Questions
View all
Recently Viewed
INTERVIEWS
Mahindra & Mahindra
No Interviews
INTERVIEWS
Birlasoft
No Interviews
INTERVIEWS
Cognizant
10 top interview questions
INTERVIEWS
Hexaware Technologies
No Interviews
INTERVIEWS
Hexaware Technologies
No Interviews
INTERVIEWS
Baker Tilly Virchow Krause
No Interviews
INTERVIEWS
Synmac Consultants
No Interviews
INTERVIEWS
VE Commercial Vehicles
No Interviews
INTERVIEWS
BNP Paribas
No Interviews
INTERVIEWS
BNP Paribas
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter