Filter interviews by
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, wh...
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: ...
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 pre...
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.
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...
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'.
What people are saying about HSBC Group
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.
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an integer...
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.
Given a singly linked list of integers, determine if it is a palindrome. Return true if it is a palindrome, otherwise return false.
1 -> 2 -&...
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
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 palin...
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.
Given an integer array ARR
of size N
with all distinct values, determine the total number of 'Inversions' that exist.
An inversion is a pair of indices (i, j)
such th...
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).
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 c...
I appeared for an interview in Mar 2022.
Round duration - 90 minutes
Round difficulty - Medium
2 programming questions, MCQs based on OS, DBMS, OOPS and web fundamentals
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 ro...
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'.
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an intege...
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.
Round duration - 40 minutes
Round difficulty - Easy
This round had 2 coding questions and some basic questions revolving around OOPs
Given a singly linked list of integers, determine if it is a palindrome. Return true if it is a palindrome, otherwise return false.
1 -> 2 -...
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
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 pr...
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.
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: Abstr...
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 o...
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.
Round duration - 30 minutes
Round difficulty - Easy
Was conducted a couple of hours after the previous Tech round. The round was a HR one, behavioral questions and discussion around my hobbies :)
Tip 1 : Be very thorough with your resume. You will be properly grilled.
Tip 2 : Be clear with the basics of atleast one programming language, and have competitive programming experience
Tip 3 : Have projects in your resume from different domains. For a fresher, HSBC looks for a jack of all trades instead of a master of one, so having projects in different domains with be greatly beneficial
Tip 1 : Have multiple projects
Tip 2 : Have a decent skillset, with good educational background
posted on 25 Jun 2022
Based on intermediate Data structures
I applied via Campus Placement and was interviewed in Oct 2021. There were 3 interview rounds.
During my internship, I worked on a project that involved developing a web application for managing customer data.
Developed a web application using HTML, CSS, and JavaScript
Implemented user authentication and authorization features
Designed and implemented a database schema for storing customer information
Created RESTful APIs for retrieving and manipulating customer data
Collaborated with a team of developers to ensure p...
I appeared for an interview before May 2021.
Round duration - 95 minutes
Round difficulty - Medium
Given a number x
and an exponent n
, compute xn
. Accept x
and n
as input from the user, and display the result.
You can assume that 00 = 1
.
Two integers...
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
Given an integer array ARR
of size N
with all distinct values, determine the total number of 'Inversions' that exist.
An inversion is a pair of indices (i, j)
such t...
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).
Round duration - 40 minutes
Round difficulty - Medium
This is the technical interview round.
The main focus of the interviewer was on the resume. He asked about everything that was mentioned in the resume whether it is the projects or the internships or extra skills or achievements.
Other questions were based on core computer subjects such as DBMS and Computer Networks.
One linked list coding question was also asked.
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.
Exam...
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, m...
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.
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 pali...
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.
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 im...
Round duration - 30 minutes
Round difficulty - Easy
This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my role.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview before Sep 2020.
Round duration - 30 minutes
Round difficulty - Easy
It was in the day time. I was asked the programming language of my choice. It was mostly focused on programming fundamentals. I was asked 2 questions based on Data Structures and Algorithms.
A loop in a linked list can be detected using Floyd's Cycle Detection Algorithm.
Use two pointers - slow and fast, where slow moves one step at a time and fast moves two steps at a time.
If there is a loop, the two pointers will eventually meet at some point within the loop.
To detect the start of the loop, reset one pointer to the head and move both pointers one step at a time until they meet again.
Round duration - 30 minutes
Round difficulty - Easy
This round was mostly focused on my resume and projects.
Round duration - 30 minutes
Round difficulty - Easy
It was in the evening. I went to their office in Gurgaon. It was taken by one of the technology director who had a lot of experience.
Do practice a lot of data structures questions as mostly questions in interviews are based on them. Also, do prepare for projects mentioned in your resume and skills which you have mentioned. Coding ninjas has a big hand in making my interview clear as I have taken a course from the coding Ninjas which helped me a lot to make my concepts clear.
Application resume tips for other job seekersKeep it short and crisp. Go through it properly before the interview. Make sure that you haven't put anything in it that can cause you problems during the interview.
Final outcome of the interviewSelectedposted on 20 May 2017
I appeared for an interview in May 2017.
Yes, the string class can be extended in most programming languages.
Inheritance can be used to extend the functionality of the string class.
By creating a new class that inherits from the string class, additional methods and properties can be added.
Extending the string class allows for customization and adding specific functionality to strings.
Example: In Python, the string class can be extended by creating a new class ...
Implicit objects in JSP are predefined objects that are available for use without any declaration or initialization.
Implicit objects in JSP include request, response, session, application, out, config, pageContext, page, exception, and others.
These objects provide access to various aspects of the JSP environment and can be used to perform common tasks.
For example, the request object allows access to HTTP request parame...
A hash map is a data structure that uses a hash function to map keys to values.
Hash map stores key-value pairs
It uses a hash function to compute an index for each key
Collisions can occur when two keys hash to the same index
Hash maps provide fast access to values based on their keys
StringBuffer and StringBuilder are both used to manipulate strings, but StringBuffer is thread-safe while StringBuilder is not.
StringBuffer is synchronized, making it safe for use in multi-threaded environments.
StringBuilder is not synchronized, making it faster but not thread-safe.
StringBuffer is preferred when multiple threads are involved, while StringBuilder is preferred for single-threaded scenarios.
Both classes p...
MVC is a software architectural pattern that separates an application into three main components: Model, View, and Controller.
Model represents the data and business logic of the application.
View is responsible for displaying the user interface.
Controller handles user input, updates the model, and interacts with the view.
MVC promotes separation of concerns and modularity in software development.
Example: In a web applica...
Annotations used in RESTful web services
1. @Path - Specifies the URI path for the resource
2. @GET - Specifies that the method handles HTTP GET requests
3. @POST - Specifies that the method handles HTTP POST requests
4. @PUT - Specifies that the method handles HTTP PUT requests
5. @DELETE - Specifies that the method handles HTTP DELETE requests
6. @PathParam - Binds the value of a URI template parameter to a method paramete...
I appeared for an interview before Mar 2021.
Round duration - 90 minutes
Round difficulty - Medium
There were 33 questions in total. The objective questions were simple.
Mary is an enthusiastic party-goer who struggles with remembering event dates. Help Mary by sorting a given list of event dates in an ascending order.
Sort a list of event dates in ascending order based on year, month, and day.
Sort the list of dates based on year, then month, and finally day.
Use a sorting algorithm to rearrange the dates in ascending order.
Ensure the constraints are met for each date in the list.
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Given an array and a target sum, find all pairs of elements that add up to the target sum.
Iterate through the array and for each element, check if the complement (target sum - current element) exists in a hash set.
If the complement exists, add the pair to the result list.
Sort the pairs based on the first element and then the second element.
Handle edge cases like duplicate elements and pairs with the same values.
Example...
Given an integer N
, your task is to recursively break it into three integer parts: N / 2
, N / 3
, and N / 4
. You need to compute the maximum sum possible by dividing the numbe...
Given an integer N, recursively break it into three parts and find the maximum sum possible.
Recursively divide N into N/2, N/3, and N/4 to find the maximum sum
Compare the sum obtained by dividing N with the sum of N itself
Return the maximum sum for each test case
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more
I appeared for an interview before Mar 2021.
Round duration - 60 minutes
Round difficulty - Medium
Technical Interview round with questions based on DSA.
Given an array ARR
of size N
, containing each number between 1 and N-1
at least once, identify the single integer that appears twice.
The first line contains an integer...
Identify the duplicate integer in an array containing numbers between 1 and N-1.
Iterate through the array and keep track of the frequency of each element using a hashmap.
Return the element with a frequency greater than 1 as the duplicate integer.
Ensure the constraints are met and a duplicate number is guaranteed to be present.
You are given an arbitrary binary tree consisting of N nodes, each associated with an integer value from 1 to 9. Each root-to-leaf path can be considered a number formed by concat...
Calculate the total sum of all root to leaf paths in a binary tree formed by concatenating node values.
Traverse the binary tree from root to leaf nodes, keeping track of the current path sum
Add the current node value to the path sum and multiply by 10 for each level
When reaching a leaf node, add the final path sum to the total sum
Return the total sum modulo (10^9 + 7)
You are given a directed acyclic graph (DAG). Your task is to perform topological sorting of the graph and return any valid ordering.
A directed acyclic g...
Implement a function to perform topological sorting on a directed acyclic graph (DAG) and return any valid ordering.
Create a graph data structure to represent the DAG
Use depth-first search (DFS) to perform topological sorting
Maintain a visited array to keep track of visited nodes
Return the ordering of nodes after DFS traversal
Round duration - 60 minutes
Round difficulty - Easy
Technical interview round with questions based on DSA.
You are given a binary tree consisting of distinct integers and two nodes, X
and Y
. Your task is to find and return the Lowest Common Ancestor (LCA) of these two nodes...
Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to nodes X and Y.
Compare the paths to find the last common node, which is the LCA.
Handle cases where one node is an ancestor of the other.
Consider edge cases like when X or Y is the root node.
Implement a recursive or iterative solution to find the LCA efficiently.
You are provided with a sorted array that has undergone 'K' rotations (the exact value of 'K' is unknown). A rotation involves shifting each element of the array to the right,...
Implement a function to find the minimum number in a rotated sorted array efficiently.
Use binary search to find the minimum element in the rotated array.
Compare the mid element with the start and end elements to determine which half of the array to search next.
Continue the binary search until the minimum element is found.
Given an array TREE
of 'N' unique integers, construct a maximum binary tree using the following rules:
TREE
.Construct a maximum binary tree from an array of unique integers following specific rules.
Find the maximum number in the array to set as the root of the tree.
Recursively construct the left subtree with elements before the maximum number.
Recursively construct the right subtree with elements after the maximum number.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Some of the top questions asked at the HSBC Group Software Engineer Trainee interview for freshers -
based on 4 reviews
Rating in categories
Assistant Manager
2.8k
salaries
| ₹6 L/yr - ₹13.4 L/yr |
Manager
2.2k
salaries
| ₹14 L/yr - ₹24 L/yr |
Senior Software Engineer
1.7k
salaries
| ₹13.2 L/yr - ₹23.7 L/yr |
Assistant Vice President
1.7k
salaries
| ₹25 L/yr - ₹43 L/yr |
Software Engineer
1.5k
salaries
| ₹7.8 L/yr - ₹14 L/yr |
Wells Fargo
JPMorgan Chase & Co.
Cholamandalam Investment & Finance
Citicorp