OLA-SDE2-Frontend Interview Experience

OLA-SDE2-Frontend

I had applied in OLA for the frontend position on their career section in March 2021.

The HR contacted me and briefed me about the role and we had discussion and she said the opening is for the PUNE location.

I agreed to it, but there was some misunderstanding I guess as my first 3 round were for Backend role, which were later changed and then there were 2 more rounds for Frontend role.

So in total I went up giving 5 rounds of interview, but eventually got rejected in the last round.

In this, I will list the questions that were asked for the Frontend Role.

Round 1: DSA

1. Binary tree, find the maximum distance from one node to another node.

My solution

Const main = (root) => {
 if(root === null){
    Return 0;
 }	
                                             
  Return height(root.left) + height(root.right) + 1;
}

Const height = (node) => {
    if(node === null){
     Return 0;
    } 

    Return  max(height(node.left), height(node.right)) + 1;
}

2. Find the frequency of number in the given sorted array.

[0,0,0,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5]

I solved this using modified binary search to find the frequency.

Const binarySearch = (arr, l, h, num, tracker, indexAlreadyConsidered) => {
   if(l < h){
	Const mid = Math.floor((l + h) / 2);

	if(arr[mid] === num && !indexAlreadyConsidered.has(mid))){
              Tracker.count++;
              
	  indexAlreadyConsidered.add(mid);	

              //check in lowerbound
               binarySearch(arr,l, mid, num, tracker, indexAlreadyConsidered);

              //check in upperbound
              binarySearch(arr, mid+1, h, num, tracker, indexAlreadyConsidered);
           }

           if(arr[mid] > num){
     
               //check in lowerbound
               binarySearch(arr,l, mid, num, tracker, indexAlreadyConsidered);

     }

     if(arr[mid] < num){
     	//check in upperbound
           binarySearch(arr, mid+1, h, num, tracker, indexAlreadyConsidered);
     }
   
   }
}

Verdict: Cleared.


Round 2: System Design

Design Hyper local market - ola booking (similar to facebook market place) where a user can create a product and post it and that product can be searched within a specified range.

For example the given product will be only available in the 5 km radius of the user locations.

Had a lot of discussion regarding the backed and frontend. How will I store the user's location and then utilize it for search.

How will you create your frontend app to create as well search the post, components, state management, debouncing, network call, location API.

My answer was based on the usage of Longitude and Latitude.

Verdict: Cleard.


Round 3: Platform round

This was the most unexpected round, I was more prepared for the Javascript heavy question but it turned out to be different.

The interviewer first asked me about the best practices of JS and how would you rate yourself in HTML, CSS, and JS out of 5.

He then asked me to create a Slider or Carousel (I was surprised). He said I can use any framework of my choice but the slider has to generic component and configurable.

I created the slider and the interviewer said that show only 3 slides (it should be configurable) at a time, I did this by using some logic on JS side and slicing the array to render only 3 slides and highlight the active one.

In the follow up question he said that slice operations are very costly, you should have created this slider using HTML and CSS as it would have been faster.

I was really hoping this round to be more JS focused but it turned out vice versa.

Verdict: Rejected.

HR called me in the morning and said that the last round feedback was negative so they are not proceeding any further.


From this interview, I can say interviews can be very subjective and it highly depends upon the interviewer, DREAM11 interview was much more better than this and questions asked in their platform round was also really good.