Amazon
Tata Motors Interview Questions and Answers
Q1. Leetcode Hard Median of two sorted arrays in O log n time
The median of two sorted arrays can be found in O(log n) time using binary search.
Divide the arrays into two parts at a certain index and compare the medians of both parts.
Adjust the dividing index based on the comparison until the medians are equal or adjacent.
Handle edge cases like uneven array lengths and one array being entirely smaller than the other.
Q2. What is event loop and how it is implemented
Event loop is a mechanism that allows for asynchronous programming by handling and executing events in a loop.
Event loop is a part of the runtime environment that continuously checks the event queue and executes the callback functions associated with the events.
It helps in managing non-blocking I/O operations efficiently by allowing the program to continue running while waiting for I/O operations to complete.
Event loop is commonly used in JavaScript for handling asynchronous ...read more
Q3. What is database warehousing and implementation
Database warehousing is the process of collecting, storing, and managing data from various sources for analysis and reporting.
Database warehousing involves extracting data from different sources
Data is transformed and loaded into a central repository for analysis
It allows for complex queries and reporting on large datasets
Examples include data warehouses like Amazon Redshift, Google BigQuery
Q4. what is react and how’s is different from vue js
React is a JavaScript library for building user interfaces, while Vue.js is a progressive JavaScript framework for building web interfaces.
React is a library, while Vue.js is a framework
React uses a virtual DOM for better performance, while Vue.js uses a virtual DOM as well but with a different approach
React has a larger community and ecosystem compared to Vue.js
React is more flexible and allows for more customization, while Vue.js is easier to learn and use for beginners
Q5. What are trees and balanced trees
Trees are data structures that consist of nodes connected by edges, with a root node at the top. Balanced trees are trees where the heights of subtrees differ by at most one.
Trees are hierarchical data structures with a root node and child nodes.
Balanced trees are trees where the heights of subtrees differ by at most one, ensuring efficient search and insertion operations.
Examples of balanced trees include AVL trees, red-black trees, and B-trees.
Q6. what is btee and it traverse
BTEE stands for Breadth-First Tree Enumeration and it is a method used to traverse a tree data structure.
BTEE is a technique used to visit all the nodes of a tree level by level, starting from the root node.
It uses a queue data structure to keep track of the nodes to be visited next.
BTEE ensures that all nodes at the same level are visited before moving on to the next level.
Q7. Find the last number in the array
Iterate through the array and return the last element
Iterate through the array using a loop
Keep track of the last element as you iterate
Return the last element once the loop is finished
Q8. reverse the linkedlist
Reverse a linked list
Iterate through the linked list and reverse the pointers
Use three pointers to keep track of current, previous, and next nodes
Update the head of the linked list to point to the last node as the new head
More about working at Amazon
Interview Process at Tata Motors
Reviews
Interviews
Salaries
Users/Month