HCL Coding Questions: 19 Problems with Solutions
19 coding problems tagged HCL — 11 easy · 7 medium · 1 hard — with solutions in 13 languages. Plus a 2-week study plan by topic.
- Problems: 19
- By difficulty: 11 easy · 7 medium · 1 hard
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
19 problems the CodeKairo catalogue tags as commonly asked in HCL's coding rounds — 11 easy, 7 medium and 1 hard — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (9), Strings (7) and Dynamic Programming (6). Tagged for HCL and no other company: Valid Perfect Square. CodeKairo's HCLTech — Written Test mock covers the HCLTech written test, the most regular pattern in this catalogue: four sections of fifteen questions, fifteen minutes each. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by HCL, which CodeKairo is not affiliated with.
HCL study plan by topic
All 19 problems tagged HCL over 2 weeks, about 8 h 35 min of solving, grouped by technique in the order they build on each other — Arrays, Hash Table, Math and Two Pointers and 7 more. It ends with the HCLTech — Written Test mock.
Week 1: Arrays, Hash Table, Math +4
12 problems on Arrays, Hash Table, Math, Two Pointers, Sliding Window, Binary Search and Stack, easiest first within each topic.
- Minimum Operations to Exceed Threshold Value I Easy
- Two Sum Easy
- Palindrome Number Easy
- Reverse String Easy
- Valid Palindrome Easy
- Merge Sorted Array Easy
- Reverse Words in a String Medium
- Longest Substring Without Repeating Characters Medium
- Minimum Size Subarray Sum Medium
- Valid Perfect Square Easy
- Valid Parentheses Easy
- Trapping Rain Water Hard
Week 2: Divide and Conquer, Bit Manipulation, Number Theory +1
7 problems on Divide and Conquer, Bit Manipulation, Number Theory and Dynamic Programming, easiest first within each topic.
- Maximum Subarray Medium
- Missing Number Easy
- Prime Factorisation Easy
- Best Time to Buy and Sell Stock Easy
- Longest Palindromic Substring Medium
- Palindromic Substrings Medium
- Partition Array for Maximum Sum Medium
Finally: the timed test
Sit the HCLTech — Written Test mock under the clock — the coding problems are only one part of the round.
HCL test patterns
- HCLTech — Written Test pattern guide and timed mock
The HCL recruitment process, round by round
All problems tagged HCL
Easy (11)
- Minimum Operations to Exceed Threshold Value I Array
- Prime Factorisation Math, Number Theory
- Valid Perfect Square Math, Binary Search
- Valid Palindrome String, Two Pointers
- Merge Sorted Array Array, Two Pointers, Sorting
- Missing Number Array, Math, Bit Manipulation
- Best Time to Buy and Sell Stock Array, Dynamic Programming
- Valid Parentheses String, Stack
- Palindrome Number Math
- Reverse String Two Pointers, String
- Two Sum Array, Hash Table
Medium (7)
- Partition Array for Maximum Sum Array, Dynamic Programming
- Reverse Words in a String Two Pointers, String
- Minimum Size Subarray Sum Array, Sliding Window, Prefix Sum
- Palindromic Substrings String, Dynamic Programming
- Longest Palindromic Substring String, Dynamic Programming
- Longest Substring Without Repeating Characters String, Sliding Window, Hash Table
- Maximum Subarray Array, Dynamic Programming, Divide and Conquer
Hard (1)
- Trapping Rain Water Array, Two Pointers, Dynamic Programming
Topics HCL asks most
- Arrays 9 problems
- Strings 7 problems
- Dynamic Programming 6 problems
- Two Pointers 5 problems
- Math 4 problems
- Hash Table 2 problems
- Sliding Window 2 problems
- Stack 2 problems
- Prefix Sum 1 problem
- Sorting 1 problem
- Binary Search 1 problem
- Divide and Conquer 1 problem