Hewlett Packard Enterprise interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Hewlett Packard Enterprise
upvote
share-icon
3 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration70 Minutes
Interview date14 Nov 2015
Coding problem2

This round had 40 MCQ's followed by 2 questions of DS and Algo. The programming questions were preety standard and can be solved within 30 minutes.

1. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
OracleSamsungAccenture

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

Approach (Using Kadane's Algo) : 

1) Declare a variable ‘maxSum’ and initialize it with ‘minimum integer’

2) Declare a variable ‘localSum’ and initialize it with ‘0’

3) Declare 3 counter variables as ‘start’ , ‘end’ , ‘newStart’ as 0, 0, 0

4) Run a loop from i = 0 to N
4.1) Add a current element to ‘localSum’

4.2) If 'localSum' is greater than 'maxSum'
Update ‘maxSum’ with 'localSum', update start with ‘newStart’ and end with loop counter ‘i’

4.3) If 'localSum' is equal to ‘maxSum’ and the difference between ‘end’ and ‘start’ is less than the 
difference between ‘newStart’ and ‘i’
Update start with ‘newStart’ and end with ‘i’

4.4) If 'localSum' is below ‘0’
Update ‘localSum’ as 0 and set ‘newStart' as ‘i’ + 1

5) Return the part of the array starting from ‘start’ and ending at ‘end’

TC : O(N), where N=size of the array
SC : O(N), we need a final array to store the result maximum subarray.

Try solving now

2. Remove character

Easy
0/40
Asked in companies
Hewlett Packard EnterpriseSiemensExpedia Group

For a given string(str) and a character X, write a function to remove all the occurrences of X from the given string and return it.

The input string will remain unchanged if the given character(X) doesn't exist in the input string.

Problem approach

Approach : 

1) We create an empty string that will store our final result. We will return it at the end.
2) We iterate from 0 to the length of the string. Say, our loop variable is i. We can then access the ith character as input[i]
3) If the ith character equals the character c i.e input[i] == c, then we skip this character and do nothing.
4) Else we need to append the character to the output string.
5) We finally return the output string.

TC : O(N), where N=length of the string
SC : O(N)

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date16 Nov 2015
Coding problem7

This round had questions from DSA, OS, DBMS and Computer Networks. The programming question was quiet easy and I coded it preety fast after discussing the appropriate approach and complexity analysis.

1. Intersection of Linked List

Easy
25m average time
73% success
0/40
Asked in companies
Red HatAmazonHSBC

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

Approach (Using 2-pointers) :

1) Initialize two pointers ptr1 and ptr2 at the head1 and head2.
2) Traverse through the lists,one node at a time.
3) When ptr1 reaches the end of a list, then redirect it to the head2.
4) Similarly when ptr2 reaches the end of a list, redirect it the head1.
5) Once both of them go through reassigning, they will be equidistant from the collision point
6) If at any node ptr1 meets ptr2, then it is the intersection node.
7) After second iteration if there is no intersection node it returns NULL.

TC : O(m+n) where m=Length of LL-1 and n=Length of LL-2
SC : O(1)

Try solving now

2. OS Question

Explain multitasking and multiprogramming.

Problem approach

Multitasking :
1) In Multitasking, a single resource is used to process multiple tasks.
2) The process resides in the same CPU.
3 It is time sharing as the task assigned switches regularly.
4) Multitasking follows the concept of context switching.


Multiprogramming :
1) In multiprogramming, multiple programs execute at a same time on a single device.
2) The process resides in the main memory.
3) It uses batch OS. The CPU is utilized completely while execution.
4) The processing is slower, as a single job resides in the main memory while execution.

3. OS Question

Difference between Process and Program

Problem approach

Process : A Process is an execution of a specific program. It is an active entity that actions the purpose of the application. Multiple processes may be related to the same program. For example, if we double-click on Google Chrome browser, we start a process that runs Google Chrome and when we open another instance of Chrome, we essentially create a second process.

Program : A Program is an executable file which contains a certain set of instructions written to complete the specific job or operation on your computer. For example, Google browser chrome.exe is an executable file which stores a set of instructions written in it which allows us to open the browser and explore web pages.

Major Differences b/w Process and Program :

1) Process is an executing part of a program whereas a program is a group of ordered operations to achieve a programming goal.

2) The process has a shorter and minimal lifespan whereas program has a longer lifespan.

3) Process contains many resources like a memory address, disk, printer while Program needs memory space on the disk to store all instructions.

4) When we distinguish between process and program, Process is a dynamic or active entity whereas Program is a passive or static entity.

5) To differentiate program and process, Process has considerable overhead whereas Program has no significant overhead cost.

4. OS Question

Difference between Process and Thread

Problem approach

Process : A process is the execution of a program that allows us to perform the appropriate actions specified in a program. It can be defined as an execution unit where a program runs. The OS helps us to create, schedule, and terminates the processes which is used by CPU. The other processes created by the main process are called child process.

Thread : Thread is an execution unit that is part of a process. A process can have multiple threads, all executing at the same time. It is a unit of execution in concurrent programming. A thread is lightweight and can be managed independently by a scheduler. It helps us to improve the application performance using parallelism.


Major Differences b/w Process and Thread : 

1) Process means a program is in execution, whereas thread means a segment of a process.
2) A Process is not Lightweight, whereas Threads are Lightweight.
3) A Process takes more time to terminate, and the thread takes less time to terminate.
4) Process takes more time for creation, whereas Thread takes less time for creation.
5) Process likely takes more time for context switching whereas as Threads takes less time for context switching.
6) A Process is mostly isolated, whereas Threads share memory.
7) Process does not share data, and Threads share data with each other.

5. DBMS Question

What is the main difference between UNION and UNION ALL?

Problem approach

UNION and UNION ALL are used to join the data from 2 or more tables but UNION removes duplicate rows and picks the rows which are distinct after combining the data from the tables whereas UNION ALL does not remove the duplicate rows, it just picks all the data from the tables.

6. DBMS Question

Advantages of using Views.

Problem approach

The advantages of using a view in the table are :
1) It is a subset of the data in table.
2) It store complex queries.
3) It can simplify multiple tables into one.
4) It occupies very little space.
5) It presents the data from different perspectives.

7. Networking Question

What is the ARP protocol?

Problem approach

ARP is Address Resolution Protocol. It is a network-level protocol used to convert the logical address i.e. IP address to the device's physical address i.e. MAC address. It can also be used to get the MAC address of devices when they are trying to communicate over the local network.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date16 Nov 2015
Coding problem2

This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my role.

1. Basic HR Question

Why should we hire you ?

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

2. Basic HR Question

Tell me something not there in your resume.

Problem approach

If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from your resume.

Example :

Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.

Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more efficient.

Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great deal of energy if hired.

These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is nothing to worry about if you have a good cammand over your communication skills and you are able to propagate your thoughts well to the interviewer.

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 the output of print(type("Python"))?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 11 problems
Interviewed by Hewlett Packard Enterprise
1694 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 10 problems
Interviewed by Hewlett Packard Enterprise
1037 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Hewlett Packard Enterprise
2019 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Hewlett Packard Enterprise
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
113319 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
56812 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34453 views
6 comments
0 upvotes