Amazon
Dr. Reddy's Interview Questions and Answers
Q1. Given a sorted array of integers, find the frequency of 2 in the array in log(n) time.
Find frequency of 2 in sorted array of integers in log(n) time.
Use binary search to find first and last occurrence of 2 in array.
Calculate frequency by subtracting last index from first index and adding 1.
Time complexity is O(log(n)).
Q2. Given an array of numbers, for each index of the array, find the maximum frequency integer to the right of the array.
Find the maximum frequency integer to the right of each index in an array of numbers.
Create a frequency map of the array.
Iterate through the array and for each index, find the maximum frequency integer to the right using the frequency map.
If there are no integers to the right, return -1.
Q3. To reverse Linked List in pair of three.
Reverse a linked list in pairs of three.
Create a function that takes the head of the linked list as input.
Traverse the linked list in pairs of three and reverse each pair.
Update the head of the linked list to the new head after reversing each pair.
Return the new head of the linked list.
Q4. Search a number in sorted rotated array.
Search a number in sorted rotated array.
Use binary search to find the pivot point where the array is rotated
Determine which half of the array the target number may be in
Perform binary search on the appropriate half of the array to find the target number
Q5. How do you handle tradeoffs
I prioritize based on importance and impact, considering both short-term and long-term consequences.
Identify the key factors involved in the tradeoff
Evaluate the potential outcomes of each option
Consider the short-term and long-term implications
Communicate with stakeholders to gather input and perspectives
Make a decision based on the overall impact and importance
Q6. Explain about time management
Time management is the process of planning and organizing how to divide your time between specific activities.
Prioritize tasks based on importance and deadlines
Set specific goals and deadlines for each task
Use tools like calendars and to-do lists to stay organized
Avoid multitasking and focus on one task at a time
Allocate time for breaks and relaxation to avoid burnout
Q7. Gfg easy problem
The question is about solving an easy problem on GeeksforGeeks.
Read the problem statement carefully to understand the requirements.
Break down the problem into smaller subproblems if needed.
Implement the solution using the appropriate data structures and algorithms.
Test the solution with sample inputs to ensure correctness.
Q8. Your percentage
My percentage is 85%.
I achieved an 85% overall grade in my last semester.
I consistently maintained an 85% average throughout my academic career.
My performance evaluation rated me at 85% for my work performance.
More about working at Amazon
Top HR Questions asked in Dr. Reddy's
Interview Process at Dr. Reddy's
Top Intern Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month