BuyHatke Interview Experience — July 2020
BuyHatke visited our campus for internships and full time. I took part in the internship drive and I am sharing my experience here. Around 200 students shortlisted for an online round on the basis of their Resume.
Interview Consist of 3 rounds.
Round 1: Online Coding round
A round consists of 4 coding questions range from medium to hard at the Interviewbit platform.
1. All distinct triplets whose sum equal to 0 .2. Zigzag string Conversion3. Mark all Hamiltonian Cycle in a given graph4. Find a first non-repeating character in a stream of characters.
(In 4th question if the first non-repeating character if not found print ‘#’)
Students solved 3 questions completely are moving to the next round.
I managed to solve all four questions.
25 students selected for the next Technical round (including me).
Round 2: Technical Interview round
They have 5 Panel who taking Interviews on Skype.
First 15 to 20 min Introduction and question on LP, questions on my experience in various Hackathons, I was made many websites he asked me to show them, followed by one javascript question — what is asynchronous javascript.
He starts with Coding Questions.
Question on arrays
1.Finding a peek element in the array - Return any Element greater than it's adjacents. Eg. [1,2,3,4,5,6,4] output- 6
I was given a binary search solution and he was satisfied. Complexity (Log n)
Question on Bit manipulation
2. Given a number and integer K. Return a number after offsetting all the bits after K in the binary representation of the given number But without any kind of loop or recursion. He was trying to ask me to do using Bit manipulation only.Eg. num-15 K=2
1111 after offsetting all the bits after K position - 0011
Output- 3
My solution: Num & (pow(2,K)-1). complexity- O( Logn) because pow function uses a faster exponentiation method
The interviewer asked me in O( 1) time.
Question on graph
3. Given a Directed positive weighted graph with source and destination node. Return the minimum weight to reach the destination node. But its compulsory to take one or more paths in between
to reach the destination node. (In the least Complexity).
I suggested a Floyd warshall algorithm for a graph.
Now we have all pair shortest path for a graph. Now we have to find that non-destination node which is at the least distance to destination and source, return addition of both distances. Complexity- O(N³)
He was not satisfied with the time complexity.
He gave me a Hint: This problem, you need to run four times Dijkstra Algorithm.
But I was unable to answer it.
Result: Rejected
As a result, I was rejected and I was not happy But When I get to know that all 25 students are rejected, Then I feel a little bit better (Just Kidding ). Although I get rejected but learn a lot.