Carwale
BT Group Interview Questions and Answers
Q1. given two arrays that one array consists of the arrival time of trains and the other one consists of the departure time of trains. find out the minimum number of platforms so that none of them should crash.
The minimum number of platforms needed to avoid train crashes based on arrival and departure times.
Sort the arrival and departure arrays in ascending order.
Initialize a variable to keep track of the maximum number of platforms needed.
Iterate through the arrival and departure arrays simultaneously.
If the current arrival time is less than or equal to the current departure time, increment the platform count.
If the current arrival time is greater than the current departure time, ...read more
Q2. find two missing number from a given array ,without sorting and o(n)
Find two missing numbers from an unsorted array in O(n) time complexity.
Calculate the sum of all numbers from 1 to n using the formula n*(n+1)/2
Calculate the sum of all numbers in the given array
Subtract the sum of array from the sum of all numbers to get the sum of missing numbers
Use the sum of missing numbers and the sum of squares of all numbers from 1 to n to calculate the missing numbers using simultaneous equations
Q3. one golden bricks n divide it to min number of part so that u can pay each day salary to a worker
Divide a golden brick into minimum parts to pay daily salary to a worker.
The number of parts needed will depend on the daily salary of the worker.
The size of the parts should be equal.
The parts should be small enough to cover the daily salary but large enough to minimize the number of parts.
The formula to calculate the number of parts is: number of parts = total value of the golden brick / daily salary
Q4. make 4 equal shape part of a cake if u cut 1/4 part already
Cut the cake in half horizontally and vertically to get 4 equal shape parts.
Cut the cake in half horizontally.
Cut the cake in half vertically.
Arrange the resulting pieces to form 4 equal shape parts.
Ensure each part has the same amount of cake.
Use a knife or cake slicer to make the cuts.
Be careful not to break the cake while cutting.
Q5. find ave salary without disclosing any one salary
To find average salary without disclosing any one salary
Collect salaries of all employees
Add all salaries and divide by total number of employees
Do not disclose any individual salary
Q6. find right veiw of a binary tree
To find the right view of a binary tree, we need to traverse the tree and keep track of the rightmost node at each level.
Traverse the tree using level order traversal
At each level, keep track of the rightmost node
Add the rightmost node to the result array
Return the result array
Q7. Given an array, remove all duplicates in place
Remove duplicates from array of strings in place
Use a HashSet to keep track of unique elements
Iterate through the array and remove duplicates by checking if element is already in the HashSet
Update the array in place by shifting elements to fill in the removed duplicates
Q8. system design for twitter.
Twitter system design involves multiple components such as servers, databases, caching, and APIs.
Use sharding to distribute data across multiple servers
Implement caching to reduce database load
Use message queues for handling high traffic
Implement APIs for user authentication and data retrieval
Use load balancers to distribute traffic evenly
Implement a search engine for efficient search functionality
Q9. Caching and its uses
Caching is the process of storing data in a temporary location to reduce access time and improve performance.
Caching helps reduce the load on servers by serving frequently accessed data quickly
It can improve performance by reducing the time needed to retrieve data from the original source
Examples include browser caching, CDN caching, and database caching
Interview Process at BT Group
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month