0 day streak

HP Inc. coding interview questions

Product 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
Your level: practise every reported question.
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
Valid Parenthesis StringStack Basics Medium Stack Google, TikTok (ByteDance), Roku +4 Solve
Linked List CycleSlow Fast Pointers Easy Linked List Microsoft, Apple, Nvidia +67 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
String to Integer (atoi)Simulation Medium Arrays & Hashing Amazon, Apple, Netflix +17 Solve
Diameter of Binary TreePostorder + Multiple Return Values Easy Trees & BST Google, Meta, DoorDash +22 Solve
Sort an ArrayMerge Sort Like Approach Medium Arrays & Hashing Apple, Confluent, Salesforce +27 Solve
Remove ElementTwo Pointer Easy Arrays & Hashing Zoom, Yandex, Plaid +2 Solve
Sum of Two IntegersBasics Medium Bit Manipulation Bloomberg, Optum, Swiggy +1 Solve
Tower of HanoiBasic Recursion Medium Recursion & Backtracking Societe Generale, MakeMyTrip, Thoughtworks +1 Solve
Also reported, being added to AlgoRung (6)

Minimum Recolors to Get K Consecutive Black Blocks · Minimum Cost Homecoming of a Robot in a Grid · Longest Palindrome · Set Mismatch · Subarray with 0 sum · Most Frequent Element in an Array

Questions people ask

What coding questions does HP Inc. ask most?

Valid Parentheses, Valid Parenthesis String, Linked List Cycle, Reverse Linked List, String to Integer (atoi), Diameter of Binary Tree, Sort an Array, Remove Element.

Which topics come up in HP Inc. coding rounds?

linked list, arrays, strings, stack, trees, sorting.

How hard are HP Inc. coding questions?

Of the reported questions, 5 are easy, 5 medium and 0 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.