HP INC interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

HP INC
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I saw a job opening on the company's website. I reached out to a lot of people on LinkedIn for referral. One of the employees agreed to give me referral. So, I applied through his referral and then they called me for the interview rounds. The interviews went on smoothly and I got selected.
Application story
I applied through their website. After almost a week, HR called and confirmed all details. Then, a week later, interviews were scheduled on Zoom to evaluate me mainly on the basis of DSA and System Design.
Why selected/rejected for the role?
Everything was fine, but in the third round, I was asked a question related to shell scripting that I could not answer correctly. It required some deep knowledge. So, always understand every concept in depth and mention only those things on your resume that you are confident about.
Preparation
Duration: 6 months
Topics: Computer Fundamentals, Data Structures and Algorithms
Tip
Tip

Tip 1 : Participate in live contests on coding platforms as much as possible.
Tip 2 : Practice previous interview questions from online websites.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: Have some projects on your resume. 

Tip 2: Only write things in the resume that you are confident about and keep practicing.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 Minutes
Interview date12 Apr 2023
Coding problem2

1. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
SquadstackAmazonRazorpay

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Try solving now

2. Connect n ropes with minimum cost

Easy
20m average time
80% success
0/40
Asked in companies
ArcesiumUberOptum

You have been given 'N' ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. We need to connect the ropes with minimum cost.

The test-data is such that the result will fit into a 32-bit integer.

Try solving now
02
Round
Easy
Face to Face
Duration60 Minutes
Interview date14 May 2023
Coding problem2

1. Tiling Problem

Hard
45m average time
0/120
Asked in companies
OptumOlaAdobe

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile

Count the number of ways to tile the given board using the available tiles.

Note :
The number of ways might be large so output your answer modulo 10^9 + 7.

Here an example of tile and board for 'N' = 4 :

Tiling Example

Try solving now

2. Find K’th Character of Decrypted String

Moderate
33m average time
0/80
Asked in companies
OptumAtlassianAdobe

You have been given an Encrypted String where repetitions of substrings are represented as substring followed by the count of substrings.

Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".

You need to find the 'K'th character of Decrypted String. Decrypted String would have 1-based indexing.

Note :

Input string will always be lowercase characters without any spaces.

If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.

Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.

The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.
Try solving now
03
Round
Easy
Face to Face
Duration50 Minutes
Interview date17 May 2023
Coding problem2

1. Positive Negative Pair

Easy
10m average time
90% success
0/40
Asked in companies
HSBCGrowwOptum

Given an array of distinct integers, find all the pairs having positive value and negative value of a number that exists in the array. Return the pairs in any order.

Note:
The pair consists of equal absolute values, one being positive and another negative.

Return an empty array, if no such pair exists.
Try solving now

2. Minimize Cash Flow

Easy
15m average time
85% success
0/40
Asked in companies
HCL TechnologiesMicrosoftAdobe

You are given a list of ‘transactions’ between ‘n’ number of friends. who have to give each other money. The list consists of data of receiver, sender, and transaction.

Your task is to minimize the cash flow and the total number of transactions should also be minimum.

For example :

subsequence

In figure 1 : friend-1 has to pay 2000$ to friend-2, and 4000$ to friend-3 and friend-2 has to pay 3000$ to friend-3.

In figure 2 : so we can minimize the flow between friend-1 to friend-2 by direct pay to friend-1 to friend-3
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
SDE - Cloud Developer
3 rounds | 7 problems
Interviewed by HP INC
877 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes