0 day streak

HCLTech coding interview questions

Service and IT India

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +46 Solve
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +38 Solve
Valid ParenthesesStack Basics Easy Stack Google, Microsoft, Meta +39 Solve
Longest Substring Without Repeating CharactersSliding Window · Variable Medium Arrays & Hashing Google, Amazon, Microsoft +50 Solve
Merge Sorted ArrayTwo Pointer Easy Arrays & Hashing Meta, Apple, Nvidia +12 Solve
Valid PalindromeTwo Pointer Easy Arrays & Hashing Microsoft, Apple, Bloomberg +7 Solve
Kadane's Algorithm - SimpleKadane's Algorithm Medium Arrays & Hashing Microsoft, Apple, LinkedIn +29 Solve
Trapping Rain WaterTwo Pointer Hard Arrays & Hashing Google, Amazon, Microsoft +38 Solve
Reverse StringTwo Pointer Easy Arrays & Hashing Samsung, Qualcomm, Intel +3 Solve
Palindromic SubstringsStrings Medium Dynamic Programming Salesforce, Intuit, Cognizant Solve
Missing NumberMissing / Repeated Numbers Easy Bit Manipulation Microsoft, Nvidia, Palantir +6 Solve
Minimum Size Subarray SumSliding Window · Variable Medium Arrays & Hashing Intel, Citi, Zomato Solve
Palindrome NumberMath / Number Theory Easy Arrays & Hashing Bloomberg, Morgan Stanley, Qualcomm +10 Solve
Group AnagramsHashing Medium Arrays & Hashing Amazon, Microsoft, Meta +31 Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +22 Solve
Reverse Words in a StringDouble Reversal Trick Medium Arrays & Hashing Microsoft, Nvidia, Barclays +8 Solve
First Unique Character in a StringHashing Easy Arrays & Hashing Databricks, Nutanix, Goldman Sachs +8 Solve
Valid AnagramHashing Easy Arrays & Hashing Netflix, Databricks, Bloomberg +13 Solve
Rotate ArrayDouble Reversal Trick Medium Arrays & Hashing Apple, Bloomberg, Samsung +8 Solve
Roman to IntegerRight to Left Traversal Easy Arrays & Hashing Bloomberg, Oracle, JPMorgan Chase +8 Solve
Sort Characters By FrequencyTop K / Kth Largest / Smallest Medium Heaps Citi, Wipro, Accenture +1 Solve
Product of Array Except SelfRight to Left Traversal Medium Arrays & Hashing Microsoft, Meta, Apple +13 Solve
String CompressionTwo Pointer Medium Arrays & Hashing Microsoft, Stripe, Nvidia +10 Solve
Remove Duplicates from Sorted ArrayTwo Pointer Easy Arrays & Hashing Microsoft, Bloomberg, Cisco +8 Solve
Single NumberMissing / Repeated Numbers Easy Bit Manipulation Airbnb, Bloomberg, Palantir +6 Solve
Fibonacci Number1D DP Easy Dynamic Programming Spotify, Intel, Deloitte +7 Solve
Swap two numbersXOR Basics Easy Bit Manipulation Solve
Factorial of a numberBasic Recursion Easy Recursion & Backtracking Wipro Solve
Decimal to binaryBasics Easy Bit Manipulation Capgemini Solve
Pow(x, n) (Binary Exponentiation)Search on Answer Range Medium Binary Search LinkedIn, ServiceNow, Qualcomm +2 Solve
Also reported, being added to AlgoRung (2)

Valid Perfect Square · Add Digits

Questions people ask

What coding questions does HCLTech ask most?

Two Sum, Best Time to Buy and Sell Stock, Valid Parentheses, Longest Substring Without Repeating Characters, Merge Sorted Array, Valid Palindrome, Kadane's Algorithm - Simple, Trapping Rain Water.

Which topics come up in HCLTech coding rounds?

arrays, strings, math, two pointers, sliding window, hashing.

How hard are HCLTech coding questions?

Of the reported questions, 17 are easy, 12 medium and 1 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.