I have given an interview for the HackerEarth for lead engineer profile. The first interview round was technical cum coding round. This was an online interview.
Initially, we started with the introduction and then he asked me the coding question.
The assessment was conducted on their own HackerEarth platform. This interview was scheduled for an hour.
Find the maximum profit you can gain by choosing days to buy one stock and choosing a different day in the future to sell that stock. You can hold only one stock at a time.
prices = [7,1,5,3,6,4]
This problem is similar to the coding challenge- maximum profit by buying and selling stock.
Just don’t start writing the code. First of all, explain your approach. We also discuss the complexity. And then started writing the code.
You can choose any programming language for solving this coding problem. I choose the Python programming language.
After solving the coding question, he asks me to describe the low-level design.
Write a low-level design for a cloud deployment system.
Here you have to define the relational database schema and then you have to describe classes and objects.
As we had a time constraint, he just asked me to define the database schema and attributes.
Editors’ Note: These HackerEarth interview questions for lead engineer are shared by the candidate Naman Chorde. We wish him all the best for his future.