Filter interviews by
Be the first one to contribute and help others!
I applied via Referral and was interviewed before Sep 2023.
Question related to NPD
#include
#include
#include
#include
class SeatReservation {
private:
int n; // Number of rows
int m; // Number of seats per row
std::vector
public:
SeatReservation(int rows, int seatsPerRow) : n(rows), m(seatsPerRow) {
reservedSeats.resize(n);
}
std::string reserve(int r, int k) {
if (r < 1 || r > n || k < 1 || k > m) {
return "Invalid row or seat number";
}
// Check if requested seats are available
for (int i = k; i < k + 3; ++i) {
if (reservedSeats[r - 1].count(i) > 0) {
return "Seats not available";
}
}
// Reserve the seats
for (int i = k; i < k + 3; ++i) {
reservedSeats[r - 1].insert(i);
}
return "Booked with seat number " + std::to_string(k);
}
};
int main() {
// Example usage
SeatReservation theater(2, 3);
std::cout << theater.reserve(1, 3) << std::endl; // Booked with seat number 1
std::cout << theater.reserve(2, 4) << std::endl; // Seats not available
return 0;
}
I applied via Approached by Company and was interviewed in Mar 2023.
Have Group discussion after written test and face to face interview
I applied via Referral and was interviewed in Jul 2021.
Easy for developer work on quant reasoning and verbal for aptitude round
Easy to medium level questions for coding round
I applied via Internshala and was interviewed in Apr 2023.
Aptitude test I like it very much
Coding test I like it
I applied via Referral and was interviewed in Oct 2022.
Junior Engineer
898
salaries
| ₹1.8 L/yr - ₹6 L/yr |
Assistant Engineer
664
salaries
| ₹3 L/yr - ₹9 L/yr |
Junior Engineer Civil
393
salaries
| ₹2 L/yr - ₹6 L/yr |
Senior Engineer
344
salaries
| ₹4 L/yr - ₹11 L/yr |
Civil Site Engineer
259
salaries
| ₹1.9 L/yr - ₹6 L/yr |
Larsen & Toubro Limited
TCS
BHEL
Infosys