Upload Button Icon Add office photos

Ola Cabs

Compare button icon Compare button icon Compare

Filter interviews by

Clear (1)

Ola Cabs Software Developer Intern Interview Questions and Answers

Updated 16 Sep 2021

Ola Cabs Software Developer Intern Interview Experiences

1 interview found

I was interviewed in Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 mintues
Round difficulty - Medium

Goes good no problem at all exam is between 10 to 11:30.

  • Q1. 

    Game of Dominoes Problem Statement

    Rafiq loves to play with piles of dominoes, especially when they are of equal heights. His father gifted him 'N' piles of dominoes, each with a positive number of stacke...

  • Ans. 

    Calculate minimum cost to make consecutive windows of domino piles equal in height.

    • Iterate through each window of size 'K' and calculate the minimum cost to make all piles in that window equal in height.

    • Keep track of the running sum of domino heights in each window to minimize cost.

    • Return the minimum cost for each window as the output.

  • Answered by AI
  • Q2. 

    Pair Sum Problem Statement

    You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

    Note:
    ...
  • Ans. 

    Find pairs of elements in an array that sum up to a given value, sorted in a specific order.

    • Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.

    • If the complement exists, add the pair (current element, complement) to the result list.

    • Sort the result list based on the first element of each pair, and then based on the second element if the first elements are eq

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Hard

Goes good no problem at all exam at same time between 10 to 11:30.

  • Q1. What problems did you face in your project and how did you deal with them?
  • Q2. 

    Ninja and Sorted Arrays Problem

    You are given two sorted integer arrays, ARR1 and ARR2, with sizes M and N, respectively. Merge these arrays into ARR1 as a single sorted array. Assume ARR1 has a size equa...

  • Ans. 

    Merge two sorted arrays into one sorted array in place.

    • Iterate from the end of both arrays and compare elements, placing the larger element at the end of ARR1

    • Continue this process until all elements from ARR2 are merged into ARR1

    • Ensure to handle cases where one array is fully merged before the other

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from Guru Nanak Dev University. I applied for the job as SDE - Intern in BangaloreEligibility criteriaAbove 7 CGPAOla interview preparation:Topics to prepare for the interview - Array ,DP ,Graph ,Recursion, Tree ,Queue,Time required to prepare for the interview - 1 monthInterview preparation tips for other job seekers

Tip 1 : Do atleast 1 good projects
Tip 2 : Practice Atleast 300 Questions
Tip 3 : Should be able to explain your project

Application resume tips for other job seekers

Tip 1 : Always be true with the resume 
Tip 2 : Do not put false things on resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview questions from similar companies

I applied via Campus Placement

Interview Preparation Tips

Round: Resume Shortlist
Experience: They selected 10 students from our college from CS and IT .They are looking for guys with extra projects done during college .App development will be a bonus ,contribution to open source and competitive programming will help for shortlisting.
Some of my friends had research papers published and they too got selected.

Round: Test
Experience: Have to write code snippet for 4 questions in 45 minutes
1.Difference between hour hand and minute hand
2.longest palindromic sub string.
3.Product Array puzzle
4.Some question related to matrix

Tips: All question were from geeksforgeeks
So practice it well ..u will make through it

Round: Test
Experience: Long Discussion on projects
They will scan each and every line of your Resume ,so dont write bullshits..
I wrote about interest in AI and got screwed..Discussion on college projects and final year project.
Then asked me to design a snake and ladder game OOPS concepts
Told me to find sum of all elements of sub matrix..(hint pre-processing the matrix)
Asked me about sessions and cookies
Gave a query to write on database indexing (dont remember exactly)
Asked me the code of the difference between hour hand and minute hand and extended it wid the second hand
Asked me as how to implement a dictionary
asked about TRIES ,CODE SNIPPET ON THE SHARED DOCS
One of my friend was asked to implement (set) of STL
Tips: The interviewer was cool guy..helped me a lot always made me comfortable.Interact with them as much as possible

Round: Test
Experience: Wid the CTO of the company .
Started wid the projects again .ACID properties,Database transactions,Concurrency Control
Optimization in database.
Then he asked me to code a function
Given a hash function applied on letters of English words ,un-hash it.Took me 45 minutes to reach the solution ,he helped me a lot.
Asked me to write the code for diameter of a binary tree
Asked me write the code for Boolean Matrix
One of my friend was asked to a question in which there was a bug in a m*n matrix and we have to find the bug(hint dfs or bfs)
Tips: keep calm ,,just keep talking ad he will help u a lot...

Round: HR
Experience: This was the toughest round for me...I had cleared all the rounds but they rejected me in the HR round ,,,dont know where I screwed..Learn every thing of Zomato..
They offered me an internship and thereafter they would look to give a PPO ...!!!lets see what happens

Skills: Coding Skills And Knowledge On Data Structures
Duration: 3
College Name: NIT Srinagar

Interview Questionnaire 

9 Questions

  • Q1. Write a regex for email validation?
  • Ans. 

    Regex for email validation

    • Start with a string of characters followed by @ symbol

    • Followed by a string of characters and a period

    • End with a string of characters with a length of 2-6 characters

    • Allow for optional subdomains separated by periods

    • Disallow special characters except for . and _ in username

  • Answered by AI
  • Q2. Parse the XML? and store the output in JSON. Discussed different approaches?
  • Q3. Print prime numbers in a given range and optimize the solution?
  • Ans. 

    Print prime numbers in a given range and optimize the solution.

    • Use Sieve of Eratosthenes algorithm to generate prime numbers efficiently

    • Start with a boolean array of size n+1, mark all as true

    • Loop through the array and mark all multiples of each prime as false

    • Print all the indexes that are still marked as true

  • Answered by AI
  • Q4. Puzzle – 25 horses – 5 lanes, find fastest 3 horses?
  • Q5. Web related questions on Sessions and cookies?
  • Q6. A lot of discussion on my resume, experience etc
  • Q7. Find angle between hour hand and minute hand in clock if time is given? Write a program or pseudo code?
  • Ans. 

    Find angle between hour and minute hand in a clock given the time.

    • Calculate the angle made by the hour hand with respect to 12 o'clock position

    • Calculate the angle made by the minute hand with respect to 12 o'clock position

    • Find the difference between the two angles and take the absolute value

    • If the angle is greater than 180 degrees, subtract it from 360 degrees to get the smaller angle

  • Answered by AI
  • Q8. A hash function was written to convert a string into a hash. Write a un-hash function to revert it(from hash to string)?
  • Ans. 

    To un-hash a string, use a reverse algorithm to convert the hash back to the original string.

    • Create a reverse algorithm that takes the hash as input and outputs the original string

    • Use the same logic as the hash function but in reverse order

    • If the hash function used a specific algorithm, use the inverse of that algorithm to un-hash the string

  • Answered by AI
  • Q9. He discussed about expectations and role. Asked me if I have any questions. He said to me “yaha aana hai to marwani padegi. tyar ho”? I smiled and asked what are the work timings? He said 9-9 and I was kin...

Interview Preparation Tips

General Tips: I applied through a recruiter. Then I got a call from Zomato HR. It was for LAMP developer profile. She asked me about my profile and also shared some expectations from the role. She asked me to come for F2F rounds to take the process further
Skills: Web development, JSON, Algorithm
College Name: na
Motivation: Overall process was not very tough. But they have start up culture. People work their for 11-12 hours a day. Sometimes on Saturday as well. So people who are geeks or have nothing in life to do except their job can go and join

Skills evaluated in this interview

Interview Questionnaire 

6 Questions

  • Q1. Given a Linked list , print yes if it is palindrome else print no
  • Q2. Print the level order traversal of the binary tree in the spiral form
  • Ans. 

    Print the level order traversal of binary tree in spiral form

    • Perform level order traversal of the binary tree

    • Alternate the direction of traversal for each level

    • Use a stack to reverse the order of nodes in each level

    • Print the nodes in the order of traversal

  • Answered by AI
  • Q3. Maximum of all subarrays of size k(Expected Time Complexity O(N). Input : arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6} k = 3 Output : 3 3 4 5 5 5 6
  • Ans. 

    Find the maximum element in each subarray of size k in a given array.

    • Iterate through the array from index 0 to n-k.

    • For each subarray of size k, find the maximum element.

    • Store the maximum elements in a separate array.

    • Return the array of maximum elements.

  • Answered by AI
  • Q4. Given Two sorted array of size size n each. Find the Kth largest element in these two array (Expected Time Complexity Log(n))
  • Ans. 

    To find the Kth largest element in two sorted arrays, we can use the merge step of merge sort algorithm.

    • Merge the two arrays into a single sorted array using a modified merge sort algorithm.

    • Return the Kth element from the merged array.

  • Answered by AI
  • Q5. Website having several web-pages. And also there are lot many user who are accessing the web-site. say user 1 has access pattern : x->y->z->a->b->c->d->e->f user 2 has access pattern : z->a->b->c->d user 3...
  • Q6. Given two array , one of size m+n and contains m element and other position are empty , 2nd array is of size n and contains n element. both array are sorted , now merge the second array to first one such t...
  • Ans. 

    Merge two sorted arrays into one sorted array with expected time complexity of (m+n).

    • Use a two-pointer approach to compare elements from both arrays and merge them into the first array.

    • Start comparing elements from the end of both arrays and place the larger element at the end of the first array.

    • Continue this process until all elements from the second array are merged into the first array.

  • Answered by AI

Interview Preparation Tips

Round: Test
Duration: 90 minutes

Skills: Algorithm , OS, DBMS, data structure
College Name: NIT BHOPAL

Skills evaluated in this interview

Interview Preparation Tips

Round: Test
Experience: Coding questions were comparatively easy. There were three questions.1. Given a string map each character of which to the corresponding digit in a 10 digit mobile phone keypad.2. Don't remember, will add when it comes to my mind.3. Don't remember, will add when it comes to my mind.

Skills: Coding ability, Complete knowledge of working of internet.,
College Name: IIT Bombay

Interview Preparation Tips

Round: Test
Experience: Just 1 online test



Round - I (90 mins)



Online Test conducted @ HackerRank



a. M.C.Qs (Operating System + Aptitude + C Programming Language + Object Oriented Programming)



b. Programming (2 coding questions)The Online Exam started off after a brief Presentation on Amazon.





The MCQs were largely based on Operating System, Data structures and Algorithms, OOP concepts, C language and Aptitude.



Coding Questions



1. Determine whether a Linked List is a palindrome or not.



2. Given few sets of intervals print out the the entire intervals without overlapping , if they overlap then combine them into one.



Eg: Input : (5,7) (1 , 6) (2 ,4) (10 ,14) (8,9)



Output : (1,7) (8,9) (10,14)



Advice: Must solve at least 1 coding question to have a good chance for selection into the next round
Tips: CGPA holds importance because it is basic eligibility criteria for written test and then secondly it increases odds in your favor of your selection more than those with lower CGPA with same interview performance. Prepare a good resume



1. Prioritize your content



2. Put the most important information first (Academic Projects + Internship)



3. Proofread it twice



Advice : Do your best and leave the rest to god

Round: Test
Experience: Round II

2 Coding questions

1. Classic 2-sum problem

2. Given numbers a, b as the seeds for the Fibonacci sequence determine if a third number 'k' is a part of that sequence or not. (Tricky)
Total Questions: 2

Round: Other Interview
Experience: Round III
1. Tell me about yourself
2. Project + Internship Discussion
3. Compress a given string "aabbbccc" to "a2b3c3"
constraint: inplace compression, no extra space to be used
assumption : output size will not exceed input size

Round: Technical Interview
Experience: Round IV
1. Internship Project Discussion (30 mins)
2. Find the largest count of 0s in a row in a matrix of 0s and 1s sorted in an ascending order row-wise.
3. Replicate a tree with random pointers inplace

Round: Other Interview
Experience: Round V
1. Question related to graphs involving concepts of Depth and Height of a tree. (Took a lot of time in solving it ! but finally recognized the pattern)
2. Maximum size square sub-matrix with all 1s
3. Find the median of an infinite series of integers
4. Find the most popular Google searches. (solved it using Trie and Max-Heaps)
2 more questions but can't remember them.Finally after waiting for more than 9 hours the results were announced and I was selected
Tips: Be cool and always ask the interviewer questions at the end of the interview. Explain the interviewer your progress while solving the question so that you both are on the same page + its easier for him to understand. Behavioral and H.R.
Tips
1. Speak clearly and with confidence
2. Always prepare yourself beforehand for some common questions like:
a. Tell me about yourself.
b. Why should I hire you?
c. What are your strengths and weaknesses? (give examples)
d. What is your Dream Company?

General Tips: They judge you purely on the basis of your knowledge and performance during the face to face interviews. The extra curricular activities are not given much consideration as Amazon focuses its recruitment procedure purely on the basis of your Technical Knowledge. Prepare a good resume
1. Prioritize your content
2. Put the most important information first (Academic Projects + Internship)
3. Proofread it twice
College Name: NIT JAIPUR

Interview Questionnaire 

8 Questions

  • Q1. Given a n-ary tree. Devise an algo which determines the position at which the 3rd B is present from the given index in constant time complexity
  • Ans. 

    The algorithm finds the position of the 3rd occurrence of 'B' in an n-ary tree from a given index in constant time complexity.

    • Traverse the n-ary tree using a depth-first search (DFS) algorithm

    • Keep track of the count of 'B' occurrences

    • When the count reaches 3, return the current position

    • If the end of the tree is reached before the 3rd 'B', return -1

  • Answered by AI
  • Q2. Given a dictionary with limited words. Check if the string given to you is a composite of two words which are already present in the dictionary
  • Ans. 

    Check if a given string is a composite of two words from a limited dictionary.

    • Create a hash set of all the words in the dictionary.

    • Iterate through all possible pairs of substrings in the given string.

    • Check if both substrings are present in the hash set.

    • If yes, return true. Else, return false.

  • Answered by AI
  • Q3. Given a single linked list of certain nodes. Switch adjacent nodes. Eg. 1 2 3 4 will be 2 1 4 3
  • Ans. 

    Switch adjacent nodes in a single linked list.

    • Traverse the linked list and swap adjacent nodes.

    • Keep track of previous node to update its next pointer.

    • Handle edge cases for first two nodes and last node.

    • Example: 1->2->3->4 becomes 2->1->4->3.

  • Answered by AI
  • Q4. Given a binary search tree. Traverse only the left sub-tree
  • Ans. 

    Traverse only the left sub-tree of a binary search tree.

    • Start at the root node

    • If the left child exists, visit it and repeat the process

    • If the left child does not exist, return to the parent node

    • Continue until all nodes in the left sub-tree have been visited

  • Answered by AI
  • Q5. Implementation of AVL tree. I told solution in nlogn. He asked me optimize further
  • Q6. Write a program to test whether a string and all strings that can be made using the characters of that string are palindrome or not Input Output mmo True yakak True travel False
  • Q7. Next, I was asked to design an efficient data structure for two lifts in a building of n floors
  • Ans. 

    Design an efficient data structure for two lifts in a building of n floors.

    • Use a priority queue to keep track of the floors each lift is heading to

    • Implement a scheduling algorithm to determine which lift to assign to a new request

    • Consider adding a weight limit to each lift to prevent overloading

    • Use a hash table to keep track of the current location of each lift

  • Answered by AI
  • Q8. Given a Integer, find the maximum number that can be formed from the digits. Input : 8754365 output : 8765543
  • Ans. 

    To find the maximum number that can be formed from the digits of an integer.

    • Convert the integer to a string

    • Sort the characters in descending order

    • Join the sorted characters to form the maximum number

  • Answered by AI

Interview Preparation Tips

Skill Tips: They were looking for really cool coders. High expectation on accurate answers. looking for deep understanding of algorithms and data structures.
Skills: Algorithms, Data structures
College Name: PSIT

Skills evaluated in this interview

Interview Questionnaire 

11 Questions

  • Q1. A String was given with a lot of words in it and I had to reverse all the words
  • Ans. 

    Reverse all the words in a given string

    • Split the string into an array of words

    • Loop through the array and reverse each word

    • Join the reversed words back into a string

  • Answered by AI
  • Q2. A String was given and I have to swap word by word from the beginning to the end
  • Q3. In question 2 when there are ‘n’ in the String whose position shouldn’t get affected during the swapping process
  • Ans. 

    Explaining how to handle 'n' in a string during swapping process

    • Identify the positions of 'n' in the string

    • Exclude those positions from the swapping process

    • Use a temporary variable to swap the characters

    • Ensure the swapped characters are not 'n'

    • Return the modified string

  • Answered by AI
  • Q4. Continuation was when more than 1 ‘n’ occur together
  • Q5. There is a big file containing numbers and we have to sort all of them
  • Ans. 

    We can use any sorting algorithm like quicksort, mergesort, heapsort, etc.

    • Choose the appropriate sorting algorithm based on the size of the file and the range of numbers

    • Implement the chosen algorithm in the programming language of choice

    • Read the numbers from the file into an array or list

    • Apply the sorting algorithm to the array or list

    • Write the sorted numbers back to the file

  • Answered by AI
  • Q6. How to implement word suggestions like that in Eclipse
  • Ans. 

    Word suggestions in Eclipse can be implemented using algorithms like Trie or N-gram models.

    • Use Trie data structure to store the dictionary of words

    • Implement auto-complete feature using Trie

    • Use N-gram models to suggest words based on context

    • Train the N-gram model on a large corpus of text data

    • Combine both approaches for better accuracy

    • Consider user's typing speed and frequency of words for better suggestions

  • Answered by AI
  • Q7. Given 2 integers a and b, the sequence which will be formed is a, b, a+b, a+2b…. i.e Current element = sum of the previous 2 elements. So now given a number k, how to figure out if it lies in the sequenc...
  • Ans. 

    To check if a number k lies in a sequence formed by adding previous 2 elements, start with a=0 and b=1 and iterate until k is found or exceeded.

    • Start with a=0 and b=1

    • Iterate through the sequence until k is found or exceeded

    • If k is found, return true. If exceeded, return false

  • Answered by AI
  • Q8. Given a Binary Tree, if it is a BST or not
  • Ans. 

    Check if a Binary Tree is a Binary Search Tree (BST)

    • A BST has the property that all nodes in the left subtree of a node have values less than the node's value, and all nodes in the right subtree have values greater than the node's value

    • We can traverse the tree in-order and check if the resulting sequence is sorted

    • Alternatively, we can recursively check if each node satisfies the BST property

  • Answered by AI
  • Q9. A stream of numbers are coming and I have to keep track of the kth largest number in it
  • Ans. 

    Keep track of kth largest number in a stream of numbers.

    • Use a min-heap of size k to keep track of kth largest number.

    • For each incoming number, compare it with the root of the heap.

    • If it is larger than the root, replace the root with the new number and heapify.

    • The root of the heap will always be the kth largest number.

  • Answered by AI
  • Q10. Summer Internship Project
  • Q11. Given an Infix expression, how to evaluate its answer
  • Ans. 

    Infix expression can be evaluated using the concept of operator precedence and associativity.

    • Convert the infix expression to postfix expression using stack data structure

    • Evaluate the postfix expression using stack data structure

    • Use operator precedence and associativity rules to determine the order of evaluation

    • Parentheses can be used to override the default order of evaluation

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: 1 Written Test - (20 MCQ + 2 Coding Questions) on HackerRankAmazon visited our Campus on 28th July. In the morning the recruitment process started with the Written Test. It was taken on Hacker Rank which comprised of 20 MCQ Questions followed by 2 Programming Questions. MCQ Questions usually contain questions on C, DBMS, OS, and 4-5 Logical Questions. One should be aware that the Hacker Rank platform keeps record of how much time you have spent on each Question and after spending so much time did you attempt it or not. The 2 Coding Problems were quite easy. Only speed and accuracy was required to crack this round.Written Round Coding Question -1) A Linked List was given and we had to swap the ith node with (n-i+1)th node.2)(given some intervals), merge the common Intervals.I coded both the problems and passed all the test cases of the first question and half of the test cases of the 2nd Question. By the evening the results of the written round were declared and the Interview Process started. I rushed to the Design Centre and while I was arranging my grade sheets and my resume , something totally unexpected happened. One of the Amazon Employees who was also an Alumni of MNIT Jaipur walked up to me and told me that I have done very well in the Written Test and I was ranked 2nd based on the Written Test. He wished me ‘Best of Luck’ and told me to calm down and give my best. Talking to him really motivated me a lot. At the same time I was shocked that he still remembered my name even after an year, as we had talked only for a couple of minutes during my Internship Process in Amazon in which I was among the last 3 Students who went to the final round but was not selected. Apart from the students shortlisted from the written test, Amazon also shortlists around 5-6 more candidates based on their CGPA and some other factors. But it should be noted that at any time during the Recruitment Process, Cumulative scores can be considered.
Tips: CGPA above 8 should definitely be maintained.
Total Questions: 22

Round: Technical Interview
Experience: The Interview Process started with around 25 candidates. I was among the first few with whom the Interview had started which went on smoothly



Questions of Interview Round II –



1) A String was given with a lot of words in it and I had to reverse all the words
2) A String was given and I have to swap word by word from the  beginning to the end.
3) In question 2 when there are ‘n’ in the String whose position shouldn’t get affected during the swapping process
4) Continuation was when more than 1 ‘n’ occur together.



I was asked to code the above, and told them about the time and space complexities. Then he went through my resume and based on my projects he appreciated my interest in OS. and asked me a Question –


You have a large game and a small memory, so how will you play the game.
I told him the concept of Virtual Memory and how it makes it possible to run such a game. Then he asked me whether there is any limit or constraint on the size of the virtual memory. I explained to him if the amount of memory required at any particular moment of time to run the game, itself exceeds the available size in the RAM for the user, then we won’t be able to play. Then he asked “Suppose you have a 4 GB Ram then how much memory will be available to the user and what will happen to the other memory”. I explained that kernel occupies some memory and apart from that page tables and all are also stored in the memory. Then there were some discussions regarding my projects.
Tips: These is some Important stuff which one should not miss while preparing for the interviews :


Languages one should be knowing for Placements:
1) C : For most of the companies
2) C ++ - For Faster coding using Standard Template Libraries and for OOPS Concept3) Java – For some specific companies which are focused on Java


Operating System:
1) Galvin Text Book
2) Video Lectures by Prof. Kamakoti – IIT Bombay (Not available on NPTEL. You can get it from current student of IIT Bombay or take it from me. I have Video Lectures of 2013 Pass out Batch)
3) Good grasp on OS implementation on Linux and Pint OS.
4) Detail Knowledge of How Threading is implemented in JAVA


Computer Networks:
1) Video Lectures by Prof. Sujoy Ghosh – IIT Kharagpur (Available on NPTEL)
2) Good grasp on Linux Networking (Servers and Networking Commands)


DBMS :
1) SQL Queries.
2) Database Implementation in MY SQL (Using B trees)
3) Indexing and Hashing in DBMS
4) Drawbacks of SQL Database
5) No SQL Database – Graph and Document Type Database and how they solve the problems
6) Every minute detail of the Database you have created in your DBMS Project.


Data Structures and Algorithms:
1) Video Lectures on Data Structures by Prof Naveen Garg – IIT Delhi (Available on NPTEL)
2) Video Lectures on Data Structure and Algorithm by Prof. Charles Leiserson and Prof. Erik Demaine - MIT.
3) TextBook – “Data Structures and Algorithms made Easy” by Karumanchi
4) TextBook – “Cracking the Coding Interview” by Gayle Laakmann Founder and CEO, CareerCup.com
5) GeeksforGeeks6) Company Specific Preparation by Practicing Previous Interview Papers


Programming Practices:
1) Codechef or Any other Coding Website: Experience helps to increase your Programming Speed, definitely useful in qualifying Coding Round
2) Standard Template Library in C++ for faster Coding - Hacker Rank Tutorial


Other Stuff to Study:
1) Brain Teasers
2) Design Problems (asked by Companies like Adobe. Detailed Example in Karumanchi Textbook)
3) Logical And Aptitude Preparation – Arun Sharma TextBook
4) HR Interview preparation from Indiabix.com

Round: Other Interview
Experience: Around 17 students were shortlisted. The resumes of students and their academic projects were given importance while shortlisting for this round. It started at around 10PM.



Questions of Interview Round III –



1) There is a big file containing numbers and we have to sort all of them.



I mentioned the approach mentioned in GeeksforGeeks that for example the available RAM for this purpose is 100 MB. So we can break the File in chunks of 100 Mb and bring the chunks in Memory and first sort them individually. Then we can prepare a heap containing first elements from all chunks. And keep extracting min from heap and replace it by next smallest element of the chunk it belongs. Then he asked if the number of chunks being formed here are very large, that is the heap I am preparing won’t fit in 100MB, then what to do. I suggested some further modifications and finally he was satisfied with the solution.



2) How to implement word suggestions like that in Eclipse.



I explained that it can be done using Tree Data Structure or using some sort of multilevel hashing in combination with storing words in sorted form. He asked me time complexities and told me to think of further improvements. He wasn’t completely satisfied and moved onto the next question.



3) Given 2 integers a and b, the sequence which will be formed is a, b, a+b, a+2b….



i.e Current element = sum of the previous 2 elements.



So now given a number k, how to figure out if it lies in the sequence or not.



This Question is not as easy as it looks. Here a and b can be negative or positive so the Generated Sequence can contain all positive or all negative or alternate occurrence of positive and negative element in sequence. So till which point should we generate the sequence and decide that k can or cannot lie in the sequence. I wrote a code but he mentioned few test cases in which my code was failing. After a few modifications I was able to write a satisfactory code solving all the test cases.

Round: Other Interview
Experience: I answered both the questions and also mentioned  solution to kth largest if Deletion operation is also there and if it is not. Then he told me to write the code for Heapify Function. Again there were some discussion regarding my Projects.

Round: Other Interview
Experience: Questions of Interview Round V -
This round started with a detailed discussion about my Summer Internship Project in Wooqer. After that I was asked to introduce myself. Then he asked me -

1) Given an Infix expression, how to evaluate its answer.

I was asked to write the code for it covering all the cases and I was given half an hour to do it. I wrote it in about 15-20 minutes. Interview of 4th Round got over by about 9 PM, and the results were declared by 11PM.
Tips: Amazon mostly focuses on – Tries, Big Data, Hashing, Strings. Apart from my general preparation for the Interview, I had gone through around 60 Amazon Interview Papers available on GeeksforGeeks, so I was totally aware of the kind of Questions I would be facing in the Interview, and prepared myself accordingly. In this year’s Amazon Interviews mostly the questions asked were not directly from GeeksforGeeks. And few questions which were picked directly from GeeksforGeeks, the solution they were expecting for it was better than that mentioned in GeekforGeeks. But to guess such a solution, one should surely be aware of all the existing solutions in GeeksforGeeks.

General Tips: Self Projects have a very high weight age in one's selection because this is one of the many things that distinguishes you from other candidates sitting in the Interview. It also shows your capabilities and your field of Interest. Also, Summer Internship surely matters a lot in Companies like Amazon. There was a very detail discussion of my Internship at Wooqer during the Interview Process at Amazon so be prepared.
College Name: NIT JAIPUR

Skills evaluated in this interview

I applied via Referral

Interview Questionnaire 

6 Questions

  • Q1. Design the most optimal data structures for an LRU cache
  • Ans. 

    Design optimal data structures for LRU cache

    • Use a doubly linked list to keep track of recently used items

    • Use a hash table to store key-value pairs for quick access

    • When an item is accessed, move it to the front of the linked list

    • When the cache is full, remove the least recently used item from the back of the linked list and hash table

  • Answered by AI
  • Q2. Convert a sorted array to balanced binary search tree
  • Ans. 

    Convert a sorted array to balanced binary search tree

    • Find the middle element of the array and make it the root of the tree

    • Recursively construct the left subtree using the left half of the array

    • Recursively construct the right subtree using the right half of the array

    • Repeat until all elements are added to the tree

  • Answered by AI
  • Q3. Reverse a singly linked list in groups of k in­place
  • Ans. 

    Reverse a singly linked list in groups of k in­place

    • Divide the linked list into groups of k nodes

    • Reverse each group of k nodes

    • Connect the reversed groups to form the final linked list

  • Answered by AI
  • Q4. Design the most optimal data structure for storing a word and its meaning. Note that a word could have multiple meanings
  • Ans. 

    Optimal data structure for storing words and their meanings

    • Use a hash table with the word as the key and a list of meanings as the value

    • Each meaning can be stored as a string or an object with additional information

    • Consider using a trie data structure for efficient prefix search

    • Implement a search function that can handle partial matches and synonyms

  • Answered by AI
  • Q5. Write a recursive routine to calculate a ^ n
  • Ans. 

    A recursive routine to calculate a ^ n

    • The base case is when n is 0, in which case the result is 1

    • For any other value of n, the result is a multiplied by the result of a^(n-1)

    • The recursive function should call itself with a^(n-1) as the new input

  • Answered by AI
  • Q6. Design the most optimal data structure for a never ending stream of numbers. It should be optimized for insertion, deletion, searching, finding kth largest and kth smallest
  • Ans. 

    Design optimal data structure for never-ending stream of numbers for insertion, deletion, searching, kth largest and kth smallest.

    • Use a balanced binary search tree like AVL or Red-Black tree for efficient insertion, deletion, and searching.

    • Maintain two heaps, one for kth largest and one for kth smallest.

    • For finding kth largest, use a min heap of size k and for kth smallest, use a max heap of size k.

    • Alternatively, use a...

  • Answered by AI

Interview Preparation Tips

Skills:
College Name: NA

Skills evaluated in this interview

Software Engineer Interview Questions & Answers

Amazon user image Rajesh Paramanandam

posted on 24 Feb 2017

I was interviewed in Oct 2016.

Interview Preparation Tips

Round: Test
Experience: Aptitude was quite easy they just asked us basic questions from Math,logical reasoning and english
Tips: Just think well before u do..
Duration: 1 hour 30 minutes
Total Questions: 40

Round: Behavioural Interview
Experience: It was face to face .. the interviewee asked questions from our resume... Since I m from computer science background they asked some technical questions..

Tips: Beware filling ur resume.. they will ask every stuff that you have in resume

Round: Technical Interview
Experience: Discussion about my project that i vr done in my final year.they asked me what was my role in my project

College Name: Sri ganesh college of engineering and technology
Contribute & help others!
anonymous
You can choose to be anonymous

Recently Viewed

INTERVIEWS

Nagarro

No Interviews

SALARIES

Forbes Marshall

INTERVIEWS

Sekhani Industries

No Interviews

REVIEWS

Forbes Marshall

No Reviews

INTERVIEWS

Seoyon E-hwa Automotive

No Interviews

INTERVIEWS

Hanon Systems

No Interviews

INTERVIEWS

Brembo Brake India

No Interviews

INTERVIEWS

Value Hr First Consulting

No Interviews

INTERVIEWS

Gestamp

No Interviews

INTERVIEWS

TCS

No Interviews

Tell us how to improve this page.

Ola Cabs Software Developer Intern Interview Process

based on 1 interview

Interview experience

5
  
Excellent
View more
Driver
748 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

CAR Driver
572 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Program Manager
247 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Assistant Manager
246 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Business Development Executive
241 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Explore more salaries
Compare Ola Cabs with

Uber

4.2
Compare

Meru cabs

3.8
Compare

Zoomcar

3.6
Compare

Rapido

3.8
Compare
Did you find this page helpful?
Yes No
write
Share an Interview
Rate your experience using AmbitionBox
Terrible
Terrible
Poor
Poor
Average
Average
Good
Good
Excellent
Excellent