HCL interview questions

200 questions from 36 interviews · updated from reports 2013-2025

Practise HCL-style

About

HCLTech, often called HCL, is an Indian IT services company providing software development, infrastructure management, engineering, cloud, cybersecurity, and business process services. In India, it is known for hiring Graduate Engineer Trainees (GETs) and Software Engineers for coding, testing, support, and project delivery roles.

The roles that come up most are Graduate Engineer Trainee, Software Engineer and Graduate Engineer Trainee (GET). This covers 36 candidate interviews reported from 2013 to 2025. Most sat it at entry level (31 of 34 that recorded a level), with 1 internship interviews alongside. Among the 25 that recorded either route, arrivals split between campus drives (10, 40%) and off-campus applications (15, 60%). Most questions fall under CS fundamentals and DSA.

Category
Difficulty
Round

Interview questions

Q. Solve logical reasoning questions including puzzles, number/letter series, and data interpretation

asked 2xmediumLogical reasoningOnline test2024

Ans. Break the problem into patterns, constraints, and eliminations. For series, check differences, ratios, alternating terms, squares, primes, and letter positions. For puzzles, list facts in a table and remove impossibilities. For data interpretation, read units, compare totals, percentages, and trends, then estimate before calculating to avoid traps.

Q. Why is Java platform independent?

asked 2xeasyJavaTechnical2020-2023

Ans. Java is platform independent because Java source code is compiled into bytecode, not directly into machine-specific native code. This bytecode runs on the Java Virtual Machine, which is available for different operating systems and hardware. As long as a compatible JVM exists, the same compiled program can run unchanged.

Q. Check whether a given number is an Armstrong number

asked 2xeasyMathOnline test, Technical2023-2025

Ans. To check whether a number is an Armstrong number, count its digits, sum each digit raised to that count, and compare the sum with the original number. For example, 153 is valid because 1³ + 5³ + 3³ = 153. Process digits using division and modulo. Time complexity is O(d), space is O(1).

Q. Answer verbal ability questions covering grammar, vocabulary, and reading comprehension

asked 2xeasyVerbalOnline test2024

Ans. Read the question first, then the passage or sentence with a clear purpose. For grammar, check subject verb agreement, tense, pronouns, modifiers, and parallel structure. For vocabulary, use context clues and word roots. For comprehension, identify the main idea, tone, evidence, and eliminate options that are too broad, too narrow, or unsupported.

Q. Design and implement an LRU Cache

asked 1xmediumDesignTechnical2024

Ans. Implement an LRU cache with a hash map from key to list node and a doubly linked list ordered by recent use. On get, return the value and move the node to the front. On put, update or insert at the front. If capacity is exceeded, remove the tail. Both operations are O(1).

Q. What is the Virtual DOM in React?

asked 1xmediumReactTechnical2025

Ans. The Virtual DOM in React is a lightweight JavaScript representation of the real DOM. When state or props change, React creates a new Virtual DOM tree, compares it with the previous one using reconciliation, and updates only the necessary parts of the real DOM, which makes UI updates more efficient.

Q. Explain the concepts of FFT and IFT

asked 1xmediumSignal processingOnline test2021

Ans. FFT is an efficient algorithm for computing the Discrete Fourier Transform, converting sampled data from the time or space domain into frequency components. IFT, or inverse Fourier transform, converts those frequency components back to the original signal. The key detail is that FFT reduces computation from O(n²) to O(n log n).

Q. Find the largest sum contiguous subarray

asked 1xmediumArraysTechnical2020

Ans. Use Kadane’s algorithm: scan the array, keeping the best sum ending at the current index and the best sum seen overall. At each element, either extend the previous subarray or start a new one there. Initialise with the first element to handle all negative arrays. Time is O(n), space is O(1).

Q. Print all subsequences of a given string

asked 1xmediumStringsTechnical2020

Ans. Use backtracking: at each character, make two choices, either include it in the current subsequence or skip it, then recurse to the next index. When the index reaches the string length, print the current subsequence. Use a mutable string or buffer for the path. Time complexity is O(2^n * n) due to output size.

Q. Find the merge point of two linked lists.

asked 1xmediumLinked listsTechnical2013

Ans. Use two pointers, one starting at each list head. Move both one node at a time; when a pointer reaches the end, redirect it to the other list’s head. They meet at the merge node, or both become null if there is none. Compare node references, not values. Time is O(m+n), space is O(1).

Q. Solve a program based on bit manipulation

asked 1xmediumBit manipulationTechnical2020

Ans. Use bitwise operators to represent and test values efficiently, usually with AND, OR, XOR, shifts, and masks. Identify what each bit means, build a mask for the target bit or set, then apply the needed operation. Common solutions run in O(1) per operation and use O(1) extra space.

Q. How would you resolve conflicts in a team?

asked 1xmediumConflict resolutionHR2025

Ans. Pick a real conflict where the stakes mattered but emotions stayed manageable. Emphasise listening first, clarifying facts, separating personal tension from the work issue, and finding a shared goal. Show that you involved others fairly, agreed clear actions, and followed up. Interviewers listen for maturity, ownership, calm communication, and respect.

Q. Explain Promises and callbacks in JavaScript.

asked 1xmediumJavaScriptTechnical2025

Ans. Callbacks are functions passed to another function to run later, while Promises are objects representing a future success or failure of an asynchronous operation. Callbacks can become hard to manage when nested. Promises provide a clearer chain with then and catch, and work naturally with async and await for readable asynchronous code.

Q. Explain the concept of hoisting in JavaScript

asked 1xmediumProgramming conceptsTechnical2021

Ans. Hoisting is JavaScript’s behaviour of processing declarations before code runs, so some variables and functions can be referenced before their written position. Function declarations are fully hoisted and callable. var declarations are hoisted but start as undefined. let and const are hoisted too, but cannot be accessed before declaration due to the temporal dead zone.

Q. Find the number of islands in a given 2D grid

asked 1xmediumGraphsTechnical2024

Ans. Scan every cell and start a DFS or BFS whenever you find unvisited land; each such start counts one island. During the search, mark all connected land cells as visited, usually using four directions: up, down, left and right. The grid is processed once, so time is O(rows × columns).

Q. Explain AES, DES, and RSA encryption algorithms.

asked 1xmediumNetworkingTechnical2020

Ans. AES and DES are symmetric block ciphers, while RSA is an asymmetric public key algorithm. AES encrypts fixed-size blocks with shared secret keys and is the modern standard. DES also uses a shared key but has a 56-bit key, so it is insecure. RSA uses public and private keys, mainly for key exchange and signatures.

Q. What is operator overloading? How is it handled in Java?

asked 1xmediumOOPTechnical2023

Ans. Operator overloading means defining different behaviour for an operator depending on operand types, such as using + for numbers and also for objects. Java does not allow user-defined operator overloading. Its operators have fixed meanings, with limited built-in cases like + for numeric addition and String concatenation. Use methods instead for custom behaviour.

Q. Explain Java string pool and multiple inheritance in Java

asked 1xmediumJavaTechnical2020

Ans. The Java string pool is a heap area where string literals are reused, so identical literals point to the same String object. Strings are immutable, which makes this safe. Java does not support multiple inheritance of classes, avoiding diamond problems, but a class can implement multiple interfaces, including default methods with explicit conflict resolution.

Q. What are the port numbers of protocols in the TCP/IP model?

asked 1xmediumNetworkingTechnical2020

Ans. Common TCP/IP protocol ports include HTTP 80, HTTPS 443, FTP 20 and 21, SSH 22, Telnet 23, SMTP 25, DNS 53, DHCP 67 and 68, TFTP 69, POP3 110, IMAP 143, SNMP 161 and 162, LDAP 389, and RDP 3389. Ports identify application services over TCP or UDP.

Q. Conceptual questions on Sensors and their working principles

asked 1xmediumElectronicsOnline test2021

Ans. Sensors convert a physical quantity into a measurable electrical signal. For example, a temperature sensor changes voltage or resistance with temperature, while a light sensor changes current with light intensity. The key idea is transduction: sensing energy from the environment and producing a signal that can be amplified, digitised, and processed by a system.

Q. How do you handle exceptions in a web application using PHP?

asked 1xmediumOOPTechnical2020

Ans. I handle PHP exceptions with try catch around expected failure points and a global exception handler for anything uncaught. The most important detail is to never show raw exception details to users: log the full error securely, return a clear generic message, and set the correct HTTP status code.

Q. Find the element in an array that appears more than N/3 times

asked 1xmediumArraysTechnical2024

Ans. Use the extended Boyer Moore voting algorithm to find up to two candidates, then verify their counts. Keep two candidate values and two counters, because more than N/3 can only be satisfied by at most two elements. Make one pass to choose candidates and one pass to confirm. Time is O(N), space is O(1).

Q. Can a constructor be private? If yes, why and where is it used?

asked 1xmediumOOPTechnical2020

Ans. Yes, a constructor can be private. It prevents objects from being created directly from outside the class. This is commonly used in the Singleton pattern, where the class controls its only instance, and in utility classes or factory-based designs where object creation must be restricted or centralised.

Q. Explain the role of Spring Data JPA in a Spring Boot application

asked 1xmediumDBMSTechnical2024

Ans. Spring Data JPA provides a higher level abstraction for database access in a Spring Boot application, reducing the need to write boilerplate repository code. It lets you define repository interfaces for entities, automatically implements common CRUD operations, supports query methods by naming convention, and integrates with JPA providers such as Hibernate for object relational mapping.

Q. Explain different tree traversal techniques and their time complexity

asked 1xmediumTreesTechnical2020

Ans. Tree traversal techniques include inorder, preorder, postorder and level order, and each takes O(n) time because every node is visited once. Inorder visits left, root, right; preorder visits root first; postorder visits root last. Level order uses a queue breadth first. Space is O(h) for recursion, or O(n) worst case.

Q. What is the difference between symmetric and asymmetric cryptography?

asked 1xmediumNetworkingTechnical2020

Ans. Symmetric cryptography uses the same secret key to encrypt and decrypt data, while asymmetric cryptography uses a public key and a private key pair. The key difference is key distribution: symmetric encryption is faster but requires securely sharing the secret key, while asymmetric encryption is slower but makes secure exchange easier.

Q. Write a program using arrays or linked lists to solve a given problem

asked 1xmediumArraysOnline test2024

Ans. Use an array when the size is known and fast index access matters, and use a linked list when frequent insertions or deletions are needed. I would traverse the structure, update or search as required, and handle edge cases like empty input. Typical traversal is O(n), while array indexing is O(1).

Q. What is static? Can a class be static? If yes, what is a static class?

asked 1xmediumOOPTechnical2020

Ans. Static means a member belongs to the type itself, not to an individual object. Yes, in languages such as C# a class can be static, meaning it cannot be instantiated and can contain only static members. In Java, only nested classes can be static, not top-level classes.

Q. Write a medium-level SQL query involving multiple conditions or joins.

asked 1xmediumSQLTechnical2023

Ans. Join customers to orders and order_items, then filter for completed orders in the last 90 days where the order total is above 100 and the customer is active. Group by customer and return customer name, order count, and total spend. The key detail is using inner joins and a HAVING condition for aggregates.

Q. Explain smart pointers in C++ and write code to demonstrate their usage

asked 1xmediumOOPTechnical2020

Ans. Smart pointers are C++ objects that own raw pointers and automatically release memory using RAII when ownership ends. Use std::unique_ptr for single ownership, std::shared_ptr for reference-counted shared ownership, and std::weak_ptr to observe shared objects without extending lifetime. A usage demonstration would allocate an object, transfer or share ownership, and avoid manual delete.

Q. How do you keep your automated tests maintainable and scalable over time?

asked 1xmediumSoftware testingTechnical2024

Ans. I keep automated tests maintainable by making them clear, isolated, fast, and focused on behaviour rather than implementation details. The most important detail is shared structure: reusable fixtures, test data builders, consistent naming, and good separation between unit, integration, and end-to-end tests so the suite grows without becoming brittle or slow.

Q. Find the minimum number of coins required to make a given amount of change

asked 1xmediumDynamic programmingOnline test2024

Ans. Use dynamic programming with an array where dp[x] stores the minimum coins needed to make amount x. Set dp[0] to 0 and all others to infinity, then for each amount try every coin and update from dp[x minus coin]. The answer is dp[amount], or impossible if unchanged. Time is O(amount times coins), space O(amount).

Q. Search a given word in a 2D character matrix (grid) considering all edge cases

asked 1xmediumMatricesOnline test2020

Ans. Use DFS with backtracking from every cell that matches the first character, moving to valid neighbouring cells and marking visited cells so one grid position is not reused in the same path. Handle empty grid, empty word, word longer than cells, boundaries and repeated letters. Time complexity is O(mn·4^L), space O(L).

Q. How would you handle a difficult team member or resolve conflict within a team?

asked 1xmediumConflict resolutionHR2024

Ans. Pick a real, low-drama conflict where you helped improve the outcome. Emphasise listening first, separating behaviour from personality, clarifying shared goals, and agreeing practical next steps. Interviewers listen for maturity, fairness, accountability, and whether you can address tension directly without blaming, gossiping, or escalating too early.

Q. Explain worst-case and average-case time complexity of common sorting algorithms

asked 1xmediumAlgorithmsTechnical2020

Ans. Common sorting complexities are: bubble, selection and insertion sort average and worst O(n²); merge sort average and worst O(n log n); heap sort average and worst O(n log n); quicksort average O(n log n) but worst O(n²). The key detail is that quicksort’s worst case depends on poor pivot choices, though randomisation usually avoids it.

Q. How would you create an automated script to test an e-commerce checkout process?

asked 1xmediumSoftware testingTechnical2024

Ans. I would create an end-to-end test using a tool like Playwright, Cypress, or Selenium that adds a product to the basket, signs in or checks out as guest, enters address and payment details, places the order, and verifies the confirmation. The key detail is using test payment gateways and stable test data in CI.

Q. Answer logical reasoning questions involving coding-decoding and blood relations.

asked 1xmediumLogical reasoningOnline test2023

Ans. Identify the rule before calculating the answer. In coding-decoding, compare each letter, number or word with its coded form to find shifts, reversals, positions or patterns. In blood relations, draw a simple family tree, mark gender and links, then trace relationships step by step from the named person’s point of view.

Q. Explain REST architecture and design a REST API for a given application scenario.

asked 1xmediumNetworkingTechnical2024

Ans. REST is a stateless architecture where clients manipulate resources through standard HTTP methods and clear URLs. For an application, model the main entities as resources, such as /users, /orders, and /orders/{id}. Use GET to read, POST to create, PUT or PATCH to update, DELETE to remove, and return proper status codes and JSON.

Q. How do you implement responsive web design and ensure cross-browser compatibility?

asked 1xmediumFrontend designTechnical2024

Ans. I implement responsive design with a mobile-first layout, fluid grids, flexible images, and CSS media queries. I use standard HTML and CSS, progressive enhancement, and well-supported features such as Flexbox or Grid. The most important detail is testing across target browsers and devices, using fallbacks or prefixes where support differs.

Q. Computer networking fundamentals (protocols, layers, and basic networking concepts)

asked 1xmediumNetworkingTechnical2023

Ans. Computer networking is communication between devices using agreed protocols, organised in layers such as physical, data link, network, transport and application. The key detail is encapsulation: each layer adds its own header, provides a service to the layer above, and hides lower-level details, making protocols like IP, TCP, UDP, HTTP and DNS work together.

Q. Design a system to efficiently handle a large number of requests from Uber drivers.

asked 1xmediumScalabilityTechnical2024

Ans. Use stateless driver-gateway services behind load balancers, with requests partitioned by region using geohashes. Each region is handled by independent service shards backed by queues, Redis for hot driver state, and Kafka for location streams. The key detail is geographic partitioning, so nearby updates and matching stay local and scale horizontally.

Q. Detect a cycle in a linked list and find the starting node of the cycle and its length

asked 1xmediumLinked listsTechnical2024

Ans. Use Floyd’s slow and fast pointers to detect the cycle, then find its start and length. When slow and fast meet, keep one pointer at the meeting node and move it round until it returns to count the length. To find the start, move one pointer to head, then advance both one step until they meet.

Q. Solve quantitative aptitude problems based on percentages, time and work, and probability.

asked 1xmediumProbabilityOnline test2024

Ans. Use standard formulas and translate words into equations. For percentages, convert changes into fractions or multipliers. For time and work, use work rate: work done equals rate times time. For probability, count favourable outcomes over total outcomes, adjusting for independent or dependent events. Simplify step by step and check units.

Q. Solve quantitative aptitude problems involving percentages, time and work, and probability

asked 1xmediumQuantitativeOnline test2024

Ans. Convert each problem into simple equations. For percentages, use part equals percent times whole and track increases or decreases from the original value. For time and work, use work rate per unit time and add rates for people working together. For probability, count favourable outcomes over total outcomes, adjusting for independent or dependent events.

Q. Given an array, find the next smaller element and the next greater element for each element

asked 1xmediumArraysOnline test2024

Ans. Use monotonic stacks to find the next smaller and next greater element to the right for every array element. Traverse from right to left: keep an increasing stack for next smaller and a decreasing stack for next greater, popping invalid elements before reading the top. This gives O(n) time and O(n) space.

Q. Explain deadlocks with real-life examples and how can deadlocks be avoided using Banker's Algorithm?

asked 1xmediumOperating systemsTechnical2023

Ans. A deadlock occurs when processes wait forever for resources held by each other, like two cars blocking a narrow bridge from opposite ends, or two people each holding one key the other needs. Banker’s Algorithm avoids this by granting a resource request only if the system remains in a safe state, meaning all processes can still finish eventually.

Q. Explain different state management approaches in frontend applications, such as Redux and Context API.

asked 1xmediumState managementTechnical2024

Ans. Frontend state can be managed locally in components, shared through Context API, or centrally with libraries like Redux. Local state suits isolated UI, Context suits low-frequency shared data like theme or user, and Redux suits complex, frequently updated global state because it gives predictable updates, middleware, debugging, and clearer data flow.

Q. If you are given a water bottle to release into the market, what kinds of tests would you perform on it?

asked 1xmediumProblem solvingTechnical2025

Ans. A strong answer should group tests by customer risk and product success: safety, leakage, durability, usability, compliance, packaging, and market fit. Emphasise real use cases such as drops, heat, dishwashers, child use, transport, and long-term wear. Interviewers listen for structured thinking, prioritisation, awareness of regulations, and balancing quality with launch speed.

Q. Logical reasoning questions based on figures, directions, calendars, blood relations, and coding-decoding

asked 1xmediumLogical reasoningOnline test2021

Ans. Identify the rule before calculating. For figures, compare changes in shape, number, position, rotation and shading. For directions, draw a quick map. For calendars, use odd days and leap years. For blood relations, make a family tree. For coding-decoding, map letters or numbers and test the pattern consistently.

Q. What are CSS preprocessors like SASS or LESS, and how do you organize and maintain CSS for large projects?

asked 1xmediumCssTechnical2024

Ans. CSS preprocessors like SASS and LESS extend CSS with variables, nesting, mixins, functions and imports, then compile to normal CSS. For large projects, I organise styles into small component or feature files, use shared design tokens, follow a naming convention such as BEM, avoid deep nesting, and keep common utilities and layout rules separate.

Q. Quantitative aptitude questions on simple and compound interest, profit and loss, probability, permutations, mixtures, and number systems

asked 1xmediumQuantitativeOnline test2021

Ans. Identify the topic first, then write the key formula before calculating. For interest, use principal, rate and time carefully. For profit and loss, relate cost price and selling price. For probability, count favourable over total outcomes. For permutations, check if order matters. For mixtures and number systems, use ratios, divisibility rules and systematic cases.

Q. Conceptual questions based on 12th standard physics topics such as Beams and their properties

asked 1xhardPhysicsOnline test2021

Ans. A beam is a structural member that carries loads mainly perpendicular to its length and resists bending. Its key properties are span, support type, load type, shear force, bending moment, Young’s modulus, second moment of area and deflection. The most important idea is that stiffness depends strongly on cross-section shape.

Q. Reverse a linked list

asked 1xeasyLinked listsTechnical2020

Ans. Reverse a linked list by iterating through it and changing each node’s next pointer to point to the previous node. Keep three pointers: previous, current, and next, so you do not lose the rest of the list. At the end, previous is the new head. Time complexity is O(n), space complexity is O(1).

Q. Basic SQL theory questions

asked 1xeasySQLTechnical2023

Ans. SQL is the standard language used to define, query and modify relational databases. Core theory includes tables, rows, columns, primary keys, foreign keys, joins, constraints, indexes, normalisation and transactions. The most important idea is that data is related through keys, and queries use set-based operations rather than row-by-row processing.

Q. Reverse a singly linked list

asked 1xeasyLinked listsTechnical2020

Ans. Reverse it by walking through the list once and redirecting each node’s next pointer to the previous node. Keep three pointers: previous, current, and next, so you do not lose the remaining list. At the end, previous becomes the new head. Time is O(n), space is O(1).

Q. Swap two bits of an integer.

asked 1xeasyBit manipulationTechnical2013

Ans. To swap two bits at positions i and j, first check whether they are different; if they are, toggle both bits using a mask with 1s at i and j. If the bits are the same, the integer is unchanged. This uses bitwise shifts, AND or XOR, with O(1) time and O(1) space.

Q. What is a foreign key in DBMS?

asked 1xeasyDBMSTechnical2021

Ans. A foreign key is a column or set of columns in one table that refers to the primary key or unique key of another table. It links related tables and enforces referential integrity, meaning a row cannot reference a non-existent related row unless the foreign key is allowed to be null.

Q. Differentiate between C and Python.

asked 1xeasyProgramming languagesTechnical2021

Ans. C is a compiled, low-level procedural language, while Python is an interpreted, high-level general-purpose language. C is faster and gives direct memory control through pointers, but requires manual memory management. Python is slower but easier to write, dynamically typed, garbage collected, and has richer built-in libraries for rapid development.

Q. What are hashtags used for in Python?

asked 1xeasyPythonTechnical2024

Ans. Hashtags, or the hash symbol, are used to write comments in Python. Anything after # on that line is ignored by the interpreter, unless it appears inside a string. Comments help explain code, leave notes, or temporarily disable a line while debugging.

Q. Solve logical puzzles to test analytical and problem-solving ability

asked 1xunknownLogical reasoningTechnical2020

Ans. I would first restate the facts, list constraints, and look for contradictions or forced choices. Then I would test possibilities systematically, eliminating any that break the rules. If numbers are involved, I would define variables and form equations. The answer should follow from clear eliminations, not guessing.

Showing 60 of 200 questions. Ranked by how often the same question came back across interviews.

Practise a HCL-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does HCL ask?

Candidate interviews most often cover CS fundamentals (56%) and DSA (24%).

How many rounds does HCL interview have?

Candidate interviews show an average of 3.2 rounds per experience, with a typical sequence of Online test → Technical → HR. Individual interview paths can vary.

Is the HCL interview hard?

Among questions with a recorded difficulty, the mix is easy 68%, medium 31%, hard 1%.