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

Web Developer

Hafele
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Arrays,Strings,Graphs,Stack, Queue, OOPS, DP
Tip
Tip

Tip 1 : Practice daily on Leetcode
Tip 2 : Write code on paper

Application process
Where: Referral
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : Simple and clear
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 Minutes
Interview date2 Apr 2021
Coding problem3

1. Maximum Path Sum Between Two Leaves

Hard
50m average time
35% success
0/120
Asked in companies
OYOAmazonMathworks

You are given a non-empty binary tree where each node has a non-negative integer value. Return the maximum possible sum of path between any two leaves of the given tree.

The path is also inclusive of the leaf nodes and the maximum path sum may or may not go through the root of the given tree.

If there is only one leaf node in the tree, then return -1.

Problem approach

Maximum root to leaf path sum for the subtree rooted under current node. 
The maximum path sum between leaves (desired output).
For every visited node X, we find the maximum root to leaf sum in left and right subtrees of X. We add the two values with X->data, and compare the sum with maximum path sum found so far.

Try solving now

2. Operating System Question

How does Linux OS boot?

3. Reverse Linked List

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrHSBCLenskart
Note :
You do not need to print anything, just return the head of the reversed linked list. 
Problem approach

1) Divide the list in two parts - first node and 
rest of the linked list.
2) Call reverse for the rest of the linked list.
3) Link rest to first.
4) Fix head pointer

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date10 Apr 2021
Coding problem2

1. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

Find the local minima and store it as starting index. If not exists, return.
Find the local maxima. And store it as an ending index. If we reach the end, set the end as the ending index.
Update the solution (Increment count of buy-sell pairs)
Repeat the above steps if the end is not reached.

Try solving now

2. Puzzle

There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars:A: CandiesB: SweetsC: Candies and Sweets (mixed in a random proportion)You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that has/have to be picked in order to label the jars correctly.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date11 Apr 2021
Coding problem1

Asked basic character questions
 

1. Basic HR Questions

Would you like to relocate?
Why choose our company?

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
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
961 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6451 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes