HSBC mainly hires for software development, data engineering, cybersecurity, testing, and cloud roles. The interview process generally includes:
Focus areas:
HSBC interviewers usually check:
OOP is a programming paradigm based on the concept of real-world objects. It uses classes and objects to structure code. The four pillars are Encapsulation, Polymorphism, Inheritance, and Abstraction, helping in code reusability, scalability, and security.
Encapsulation bundles data (variables) and methods (functions) into a single unit — a class — and restricts direct access to sensitive data using modifiers like private and protected. It prevents accidental modification and enhances security.
Polymorphism means one name, many forms. The same function can behave differently based on input or object. It is implemented via method overloading (compile-time) and method overriding (run-time).
Inheritance allows a class (child/subclass) to acquire properties and methods of another class (parent). It promotes code reuse. For example, a “Car” class can inherit from a “Vehicle” class.
Abstraction hides unnecessary details and shows only essential functionality. For example, when driving a car, we use a steering wheel without knowing internal mechanics. In programming, it is implemented using abstract classes or interfaces.
A constructor is a special method that initializes objects. It has the same name as the class and has no return type. It is called automatically when an object is created.
Arrays are fixed size and store elements of the same data type. ArrayList is dynamic and can increase or decrease in size automatically. ArrayList provides built-in methods for searching, removing, and sorting elements.
They define the scope and accessibility of variables/methods:
Exception handling deals with runtime errors to avoid system crashes. It uses try, catch, finally, throw, throws.
It is the automatic memory management feature that removes unused objects to free memory.
Multithreading allows multiple tasks to run simultaneously within a program, improving performance. Useful for gaming, server handling, and real-time applications.
Deadlock occurs when two or more threads wait indefinitely for each other’s resources. Proper synchronization prevents it.
A database stores and organizes data for easy retrieval. SQL databases store structured data while NoSQL databases store unstructured/large-scale data.
Structured Query Language is used to interact with relational databases through operations like SELECT, INSERT, UPDATE, DELETE.
Normalization reduces data redundancy and improves data integrity. It organizes database tables using forms like 1NF, 2NF, 3NF.
JOIN combines rows from two or more tables based on related columns. Types: INNER, LEFT, RIGHT, FULL.
Index improves query speed by providing quick access to table rows, similar to a book index.
Atomicity, Consistency, Isolation, Durability — ensure reliable DB transactions.
Software Development Life Cycle is a process of planning, designing, building, testing, deploying, and maintaining software.
Waterfall is sequential; once a phase ends, you can’t go back. Agile is iterative, includes continuous delivery, sprints, and client feedback.
API enables communication between applications. It allows one software to use services of another without understanding internal logic.
REST uses HTTP methods (GET, POST, PUT, DELETE) and works on resource-based architecture.
GET fetches data and appears in the URL; POST sends data securely in the request body.
JavaScript Object Notation — a lightweight format to exchange data between client and server.
A framework provides predefined libraries and structure to speed up development — e.g., Django, Spring Boot, React.
A library is a collection of reusable functions to solve specific problems. It offers flexibility while frameworks control structure.
ML is a subset of AI where systems learn patterns from data to make predictions or decisions without explicit programming.
Supervised uses labeled data for classification and regression. Unsupervised uses unlabeled data for clustering and pattern recognition.
Big-O measures algorithm complexity and performance. O(n) meaning time grows linearly with input size.
A way of organizing data for efficient access and modification — arrays, linked lists, stacks, queues, trees, graphs.
Stack uses LIFO (Last In First Out); Queue uses FIFO (First In First Out).
A collection of nodes where each node stores data and a pointer to the next node. Useful when frequent insertion/deletion is required.
A hierarchical data structure where each node has at most two children (left and right). Efficient for search operations.
A structure containing nodes connected with edges. Used in navigation, networking, and recommendation systems.
A function calling itself until a base condition is met. Used in tree traversal, factorial, Fibonacci, etc.
Compiler translates whole program at once; Interpreter translates line-by-line.
Virtual memory uses secondary storage as temporary RAM to handle larger processes.
Delivery of computing services (storage, servers, analytics) over the internet. Examples: AWS, Azure, Google Cloud.
Public is open for global use, private is dedicated to one organization, hybrid is a mix of both.
Networking enables data exchange between devices. Includes concepts like IP address, TCP, UDP, DNS, routing.
TCP is connection-oriented and reliable; UDP is fast but connectionless.
Cybersecurity protects systems from unauthorized access, attacks, and data breaches.
Process of converting readable data into scrambled format to secure it from attackers.
Continuous Integration and Continuous Deployment automate software development pipeline — build, test, deploy.
Docker is a containerization tool that packages applications with dependencies, enabling portability and consistency.
An orchestration platform that automates deployment, scaling, and management of containerized apps.
System used to track changes in code — Git is the most popular tool.
DevOps unifies development and operations to deliver applications faster with improved collaboration and automation.
Question: Given an array and a target value, find indices of two numbers whose sum equals the target.
Explanation: Use a hash map to store visited values. For each element, check if target – current exists in the map. Time complexity reduces to O(n) instead of nested loops.
Question: Determine whether a string reads the same forward and backward.
Explanation: Use two pointers (start & end). Compare characters while moving inward. Case sensitivity and spaces may need handling depending on question.
Question: Given n–1 numbers from 1 to n, find the missing number.
Explanation: Sum formula n × (n + 1) / 2 – sum(array) gives the missing number. Optimal and O(n) solution.
Question: Reverse the pointers of a singly linked list.
Explanation: Use three pointers: prev, curr, next. Update links iteratively until the end.
Question: Check whether a linked list contains a cycle.
Explanation: Use Floyd’s Slow & Fast Pointer Algorithm. If pointers meet, a cycle exists.
Question: Find the largest sum of any contiguous subarray.
Explanation: Track the running sum; reset to 0 when negative. Maintain global maximum. Time complexity O(n).
Question: Merge two sorted arrays into one sorted array.
Explanation: Use two pointer approach to compare elements and push smallest into result list.
Question: Count occurrences of each character.
Explanation: Use a hash map/dictionary to store frequency and iterate through characters once — O(n).
Question: Given an array of strings, find the longest shared starting substring.
Explanation: Take the first word, compare progressively with others while shrinking prefix.
Question: Return the character that appears only once in a string.
Explanation: First do frequency count via hash map then traverse again to return the first char with count = 1.
Question: Print first N Fibonacci numbers.
Explanation: Use DP array or store previous two values to avoid recursive recalculation — O(n).
Question: Check whether two strings are anagrams.
Explanation: Sort both strings or use frequency counting of characters. Case and spacing handling may matter.
Question: Check whether a string of brackets is balanced.
Explanation: Use stack; push opening brackets, pop for correct closing ones. If stack empty at end → valid.
Question: For a sorted list, remove consecutive duplicate elements.
Explanation: Traverse list, compare current with next node, skip duplicates by linking to next next.
Question: Return common elements in two arrays.
Explanation: Use a set/hash map to track elements and store intersection. Time complexity O(n + m).
Question: Given arrival and departure times, find minimum platforms needed.
Explanation: Sort arrivals and departures and use two pointers to simulate timeline. Classic greedy approach.
Question: Rotate array to right by K.
Explanation: Reverse algorithm — reverse whole array, reverse first K elements, reverse remaining elements — O(n) and no extra space.
Question: Return second maximum number in array.
Explanation: Track top two values while iterating; avoid sorting (O(n) solution). Handle duplicates correctly.
Question: Find length of the longest subsequence with increasing values.
Explanation: DP solution with O(n²) complexity or optimized binary search approach O(n log n) by maintaining tail array.
Question: Implement Least Recently Used Cache that supports get() and put().
Explanation: Use Doubly Linked List + HashMap to give O(1) access & update. Most recently used item stays at front; least recent removed first when capacity full.