
HSBC Group


50+ HSBC Group Interview Questions and Answers for Freshers
Q1. Palindromic Linked List Problem Statement
Given a singly linked list of integers, determine if it is a palindrome. Return true if it is a palindrome, otherwise return false.
Example:
Input:
1 -> 2 -> 3 -> 2 -> ...read more
Check if a given singly linked list of integers is a palindrome or not.
Traverse the linked list to find the middle element using slow and fast pointers.
Reverse the second half of the linked list.
Compare the first half with the reversed second half to determine if it is a palindrome.
Example: Input: 1 -> 2 -> 3 -> 2 -> 1 -> NULL, Output: true
Q2. Search in a 2D Matrix
Given a 2D matrix MAT
of size M x N, where M and N represent the number of rows and columns respectively. Each row is sorted in non-decreasing order, and the first element of each row is g...read more
Implement a function to search for a target integer in a 2D matrix with sorted rows.
Iterate through each row of the matrix and perform a binary search on each row to find the target integer.
Start the binary search by considering the entire row as a sorted array.
If the target is found in any row, return 'TRUE'; otherwise, return 'FALSE'.
Q3. Maximum Level Sum in a Binary Tree
Given a Binary Tree with integer nodes, determine the maximum level sum among all the levels in the tree. The sum for a level is defined as the sum of all node values present ...read more
Find the maximum level sum in a binary tree by calculating the sum of nodes at each level.
Traverse the binary tree level by level and calculate the sum of nodes at each level.
Keep track of the maximum level sum encountered so far.
Return the maximum level sum as the final result.
Q4. Reverse Linked List Problem Statement
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
Input:
The first line of input is an integer T, rep...read more
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes.
Keep track of the previous, current, and next nodes while reversing the links.
Update the head of the linked list to the last node after reversal.
Q5. Power Calculation Problem Statement
Given a number x
and an exponent n
, compute xn
. Accept x
and n
as input from the user, and display the result.
Note:
You can assume that 00 = 1
.
Input:
Two integers separated...read more
Calculate x raised to the power of n. Handle edge case of 0^0 = 1.
Accept x and n as input from user
Compute x^n and display the result
Handle edge case of 0^0 = 1
Ensure x is between 0 and 8, n is between 0 and 9
Q6. Inversion Count Problem
Given an integer array ARR
of size N
with all distinct values, determine the total number of 'Inversions' that exist.
Explanation:
An inversion is a pair of indices (i, j)
such that:
AR...read more
Count the total number of inversions in an integer array.
Iterate through the array and for each element, check how many elements to its right are smaller than it.
Use a merge sort based approach to efficiently count the inversions.
Keep track of the count of inversions while merging the sorted subarrays.
Example: For input [2, 4, 1, 3, 5], there are 3 inversions: (2, 1), (4, 1), and (4, 3).
Q7. Palindrome Linked List Problem Statement
You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true
if it is a palindrome...read more
Check if a given singly linked list is a palindrome or not.
Traverse the linked list to find the middle element using slow and fast pointers.
Reverse the second half of the linked list.
Compare the first half with the reversed second half to determine if it's a palindrome.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have method implementations, while interface cannot.
A class can implement multiple interfaces, but can only inherit from one abstract class.
Interfaces are used to define contracts for classes to implement, while abstract classes are used to provide a common base for subclasses.
Example: Abstract class 'Shape' with abstract method 'calculateArea' and...read more
Q9. what is the difference between clustering and classification.
Clustering groups data points based on similarity while classification assigns labels to data points based on predefined categories.
Clustering is unsupervised learning while classification is supervised learning.
Clustering is used to find patterns in data while classification is used to predict the category of a data point.
Examples of clustering algorithms include k-means and hierarchical clustering while examples of classification algorithms include decision trees and logist...read more
Q10. What is DBMS and RDBMS and difference between them?
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
Q11. What are the 4 pillars of OOPs?
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
Q12. How to understand customer behaviour based on credit card transaction? What would be your approach?
To understand customer behaviour based on credit card transaction, I would analyze spending patterns, transaction frequency, and purchase categories.
Analyze spending patterns to identify high and low spenders
Analyze transaction frequency to identify regular and irregular customers
Analyze purchase categories to identify customer preferences and interests
Use data visualization tools to identify trends and patterns
Compare customer behavior to industry benchmarks and competitors
I...read more
Overloading is having multiple methods in the same class with the same name but different parameters. Overriding is implementing a method in a subclass that is already present in the superclass.
Overloading involves multiple methods with the same name but different parameters
Overriding involves implementing a method in a subclass that is already present in the superclass
Overloading is determined at compile time, while overriding is determined at runtime
Q14. What is Object oriented programming?
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
Ninja is a genius in mathematics. He got an interview call from MIT. During the interview, the professor asked Ninja a challenging question.
Given two integers 'N1' and 'N2', the professor ...read more
Calculate the fraction when one integer is divided by another, with repeating decimal parts enclosed in parentheses.
Divide the first integer by the second integer to get the fraction
Identify if the decimal part is repeating and enclose it in parentheses
Return the fraction for each test case
Q16. What is your area of interest?
My area of interest is machine learning and artificial intelligence.
I enjoy working with large datasets and developing algorithms to analyze and extract insights from them.
I have experience with various machine learning techniques such as regression, classification, and clustering.
I am also interested in natural language processing and computer vision.
Some examples of my work include developing a recommendation system for an e-commerce website and building a chatbot for custo...read more
Q17. Write down code implementing all 4 pillars of OOPs.
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
Q18. What is SQL and who its different from mySQL?
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
Q19. Find Slope Problem Statement
Given a linked list where each node represents coordinates on the Cartesian plane, your task is to determine the minimum and maximum slope between consecutive points.
Example:
Input...read more
Given a linked list of coordinates, find the starting nodes of segments with maximum and minimum slopes between consecutive points.
Traverse the linked list and calculate slopes between consecutive points
Identify the segments with maximum and minimum slopes
Return the starting nodes of these segments
Q20. Write a code to find the 2nd largest element in an array.
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
DELETE removes specific rows from a table, while TRUNCATE removes all rows and resets auto-increment values.
DELETE is a DML command, while TRUNCATE is a DDL command.
DELETE can be rolled back, while TRUNCATE cannot be rolled back.
DELETE triggers ON DELETE triggers, while TRUNCATE does not trigger any triggers.
DELETE is slower as it logs individual row deletions, while TRUNCATE is faster as it deallocates data pages.
Example: DELETE FROM table_name WHERE condition; TRUNCATE tabl...read more
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Denormalization is the opposite process.
Normalization involves breaking down data into smaller, more manageable tables to reduce redundancy.
Denormalization involves combining tables to improve query performance.
Normalization helps maintain data integrity by reducing the risk of anomalies.
Denormalization can improve read performance but may lead to data redundancy.
Exa...read more
Q23. What are different types of join? And how they differ from each other?
Different types of join include inner, outer, left, right, cross, and self join.
Inner join returns only the matching rows from both tables.
Outer join returns all rows from both tables and null values for non-matching rows.
Left join returns all rows from the left table and null values for non-matching rows from the right table.
Right join returns all rows from the right table and null values for non-matching rows from the left table.
Cross join returns the Cartesian product of b...read more
Q24. How do you solve conflicts?
I approach conflicts by actively listening, identifying the root cause, and finding a mutually beneficial solution.
Listen to all parties involved and understand their perspectives
Identify the root cause of the conflict
Brainstorm potential solutions with all parties
Find a mutually beneficial solution
Communicate the solution clearly and ensure all parties agree
Q25. Difference between C and C++?
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.
Static polymorphism refers to the mechanism where the method to be called is determined at compile time.
Method overloading is an example of static polymorphism where the method to be called is resolved at compile time based on the method signature.
Compile-time polymorphism is another term for static polymorphism.
Static polymorphism is achieved through function overloading and operator overloading.
Q27. Difference between Delete, Truncate and Drop?
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.
Q28. What is merge sort and its Algorithm ?
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
Private and special IP addresses are reserved ranges of IP addresses used for specific purposes.
Private IP addresses are used within a private network and are not routable on the internet.
Special IP addresses include loopback address (127.0.0.1) and broadcast address (255.255.255.255).
Private IP ranges include 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255.
Q30. What are different types of banking products?
Banking products include savings accounts, checking accounts, loans, credit cards, and investment accounts.
Savings accounts: earn interest on deposited funds
Checking accounts: used for daily transactions and bill payments
Loans: borrowed money with interest
Credit cards: allows purchases on credit with interest
Investment accounts: used to invest in stocks, bonds, and mutual funds
Q31. Code anything you wish to do
I would like to create a program that generates a random password.
Use a combination of letters, numbers, and special characters
Allow the user to specify the length of the password
Ensure that the password is strong and not easily guessable
The OSI Reference Model defines 7 layers that represent different functions in networking.
Physical Layer - deals with physical connections and signals (e.g. cables, hubs)
Data Link Layer - manages data transfer between devices on the same network (e.g. Ethernet)
Network Layer - handles routing and forwarding of data packets (e.g. IP)
Transport Layer - ensures reliable data delivery (e.g. TCP)
Session Layer - establishes, maintains, and terminates connections (e.g. SSL)
Presentatio...read more
Q33. Different kind of Joins in DBMS ?
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
Q34. Difference between Stacks and Queues?
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.
Q35. What is lazy evaluation in spark.
Lazy evaluation in Spark delays the execution of transformations until an action is called.
Lazy evaluation allows Spark to optimize the execution plan by combining multiple transformations into a single stage.
Transformations are not executed immediately, but are stored as a directed acyclic graph (DAG) of operations.
Actions trigger the execution of the DAG and produce results.
Example: map() and filter() are transformations that are lazily evaluated until an action like collec...read more
Q36. What is skewness and skewd tables
Skewness is a measure of asymmetry in a distribution. Skewed tables are tables with imbalanced data distribution.
Skewness is a statistical measure that describes the asymmetry of the data distribution around the mean.
Positive skewness indicates a longer tail on the right side of the distribution, while negative skewness indicates a longer tail on the left side.
Skewed tables in data engineering refer to tables with imbalanced data distribution, which can impact query performan...read more
Q37. What is spark and explain working
Spark is a distributed computing framework designed for big data processing.
Spark is built around the concept of Resilient Distributed Datasets (RDDs) which allow for fault-tolerant parallel processing of data.
It provides high-level APIs in Java, Scala, Python, and R for ease of use.
Spark can run on top of Hadoop, Mesos, Kubernetes, or in standalone mode.
It includes modules for SQL, streaming, machine learning, and graph processing.
Spark uses in-memory processing to speed up ...read more
Q38. How the connect two grids which are different frequencies?
Q39. Difference between list and tuple
List is mutable, tuple is immutable in Python.
List can be modified after creation, tuple cannot.
List uses square brackets [], tuple uses parentheses ().
List is used for collections of items that may change, tuple for fixed collections.
Example: list - [1, 2, 3], tuple - (1, 2, 3)
Q40. Code for Binary search
Binary search is a divide and conquer algorithm that finds the position of a target value within a sorted array.
Start by defining the low and high indices of the array.
Calculate the middle index and compare the target value with the middle element.
If the target value is less than the middle element, update the high index to mid-1.
If the target value is greater than the middle element, update the low index to mid+1.
Repeat the process until the target value is found or the low ...read more
Q41. 3 strengths and 3 Weaknesses
Strengths: Leadership skills, problem-solving abilities, strong communication. Weaknesses: Impatience, perfectionism, delegation.
Strengths: Leadership skills - ability to motivate and guide team members towards goals
Problem-solving abilities - adept at finding solutions to complex issues
Strong communication - effective at conveying ideas and information clearly
Weaknesses: Impatience - tendency to rush through tasks without thorough consideration
Perfectionism - difficulty in a...read more
Q42. Tell me what all electronic components you know
Q43. What is mapreduce
MapReduce is a programming model and processing technique for parallel and distributed computing.
MapReduce is used to process large datasets in parallel across a distributed cluster of computers.
It consists of two main functions - Map function for processing key/value pairs and Reduce function for aggregating the results.
Popularly used in big data processing frameworks like Hadoop for tasks like data sorting, searching, and counting.
Example: Counting the frequency of words in...read more
Q44. Explain data frames in pandas
Data frames in pandas are two-dimensional, size-mutable, and potentially heterogeneous tabular data structures with labeled axes (rows and columns).
Data frames are like spreadsheets or SQL tables with rows and columns.
They can hold different types of data in each column.
Data frames can be created from dictionaries, lists, or other data structures.
Operations like filtering, merging, and grouping can be performed on data frames.
Example: df = pd.DataFrame({'A': [1, 2, 3], 'B': [...read more
Q45. What is variable frequency drive?
Q46. Explain the advantages and disadvantages of social media
Social media has advantages like easy communication and networking, but also has disadvantages like cyberbullying and addiction.
Advantages: easy communication, networking, access to information, marketing opportunities
Disadvantages: cyberbullying, addiction, spread of misinformation, privacy concerns
Example: Social media can be used to connect with friends and family, but can also lead to cyberbullying and mental health issues.
Example: Social media can be used for marketing a...read more
Q47. Difference between 2-pole and 4-pole machine
Q48. What are NAV components
NAV components refer to the various elements that make up the Net Asset Value of a fund.
NAV components include assets, liabilities, income, and expenses.
Assets can include stocks, bonds, and other investments held by the fund.
Liabilities can include expenses owed by the fund, such as management fees.
Income can include dividends and interest earned by the fund.
Expenses can include management fees, legal fees, and other costs associated with running the fund.
Q49. Sort Strings Greatest element in array
Find the greatest element in an array of strings.
Convert the strings to numbers if applicable before comparing.
Use a loop to iterate through the array and keep track of the greatest element.
Handle edge cases like empty array or non-numeric strings.
Q50. Feature selection methods
Feature selection methods help in selecting the most relevant features for building predictive models.
Feature selection methods aim to reduce the number of input variables to only those that are most relevant.
Common methods include filter methods, wrapper methods, and embedded methods.
Examples include Recursive Feature Elimination (RFE), Principal Component Analysis (PCA), and Lasso regression.
Q51. what is vpn how it works
VPN stands for Virtual Private Network, a technology that allows users to securely access a private network over a public network.
VPN creates a secure and encrypted connection between the user's device and the private network.
It masks the user's IP address and encrypts data to ensure privacy and security.
VPN can be used to access restricted websites, secure remote access to a company's network, and protect data while using public Wi-Fi.
Popular VPN services include NordVPN, Ex...read more
Q52. how fast and efficient you are
I am highly efficient and always strive to complete tasks quickly without sacrificing quality.
I prioritize tasks based on urgency and impact on users
I constantly look for ways to streamline processes and improve efficiency
I have a track record of resolving issues promptly and effectively
I am proficient in troubleshooting and problem-solving techniques
Q53. Discuss how was process
Q54. dhcp how it works
DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically assigns IP addresses to devices on a network.
DHCP server assigns IP addresses to devices on a network
DHCP clients request IP addresses from the DHCP server
DHCP lease time determines how long an IP address is valid for
DHCP uses UDP port 67 for server and port 68 for client communication
Q55. Your s favorite place
My favorite place is the beach.
I love the sound of the waves crashing against the shore.
The feeling of sand between my toes is so relaxing.
Watching the sunset over the ocean is breathtaking.
I enjoy swimming in the ocean and feeling weightless.
The beach is a great place to read a book or take a nap.
Top HR Questions asked in HSBC Group for Freshers
Interview Process at HSBC Group for Freshers

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

