Add office photos
Engaged Employer

Expedia Group

3.9
based on 274 Reviews
Filter interviews by

Tata Lockheed Martin Aerostructures Interview Questions and Answers

Updated 24 Aug 2024
Popular Designations

Q1. Given array of integer create subarray with sum = 0

Ans.

Create subarrays with sum = 0 from given array of integers.

  • Iterate through the array and keep track of the running sum.

  • Store the running sum in a hashmap and check if the current sum - any previous sum equals 0.

  • If yes, then the subarray between those two indices has a sum of 0.

Add your answer

Q2. System Design - Design a parking lot

Ans.

Design a parking lot system with features like parking, retrieving, and tracking available spots.

  • Create a ParkingLot class with attributes like total number of spots, available spots, and a list of parked vehicles.

  • Implement methods for parking a vehicle, retrieving a vehicle, and tracking available spots.

  • Use data structures like arrays or lists to manage parked vehicles and available spots.

  • Consider implementing features like ticketing system, vehicle size restrictions, and pa...read more

Add your answer

Q3. Longest subsequence with sum zero

Ans.

Find the longest subsequence in an array with sum zero.

  • Iterate through the array and keep track of the running sum.

  • Store the running sum in a hashmap along with the index.

  • If the same sum is encountered again, the subsequence between the two indices has a sum of zero.

Add your answer

Q4. System design: Hotel booking system

Ans.

Design a hotel booking system for managing reservations and availability.

  • Use a database to store hotel information, room availability, and reservations.

  • Implement user authentication and authorization for booking.

  • Include a search feature for users to find available rooms based on their criteria.

  • Allow users to make reservations, modify or cancel them.

  • Send confirmation emails to users after successful bookings.

Add your answer
Discover Tata Lockheed Martin Aerostructures interview dos and don'ts from real experiences

Q5. Find diameter of tree

Ans.

The diameter of a tree is the longest path between two leaf nodes in the tree.

  • Calculate the longest path between two leaf nodes in the tree

  • This can be done by finding the height of the left and right subtrees and adding them together

  • The diameter of the tree is the maximum of either the diameter of the left subtree, the diameter of the right subtree, or the sum of the heights of the left and right subtrees

Add your answer

Q6. Left view of binary tree

Ans.

The left view of a binary tree is the set of nodes visible when the tree is viewed from the left side.

  • Traverse the tree in a level order manner and keep track of the first node at each level.

  • Use a queue to store nodes at each level and update the left view nodes accordingly.

  • Example: For a binary tree with root node 1, left child 2, and right child 3, the left view would be [1, 2].

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.8
 • 153 Interview Questions
3.9
 • 26 Interview Questions
3.8
 • 15 Interview Questions
3.6
 • 13 Interview Questions
3.9
 • 11 Interview Questions
3.3
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter