I believe there is an error in the sample output for the RemoveAndRearrange problem.
Sample Input
1001
Maruti
Diesel
1002
Kia
Petrol
1003
Hyundai
Diesel
1004
Taxi
Petrol
1005
Truck
Diesel
1003
Problem Statement
The problem states that the method should:
Remove the Car whose carId matches the input parameter.
Return the remaining Car objects with continuous new IDs.
Issue
The sample output is:
1001 : Maruti
1002 : Kia
1003 : Hyundai
1004 : Taxi
However, the input ID to remove is 1003, which belongs to Hyundai. Therefore, Hyundai should not appear in the output.
According to the problem statement, the correct output should be:
1001 : Maruti
1002 : Kia
1003 : Taxi
1004 : Truck
Could you please verify and correct the sample output if this is a typo?
Thank you.
I believe there is an error in the sample output for the RemoveAndRearrange problem.
Sample Input
1001
Maruti
Diesel
1002
Kia
Petrol
1003
Hyundai
Diesel
1004
Taxi
Petrol
1005
Truck
Diesel
1003
Problem Statement
The problem states that the method should:
Remove the Car whose carId matches the input parameter.
Return the remaining Car objects with continuous new IDs.
Issue
The sample output is:
1001 : Maruti
1002 : Kia
1003 : Hyundai
1004 : Taxi
However, the input ID to remove is 1003, which belongs to Hyundai. Therefore, Hyundai should not appear in the output.
According to the problem statement, the correct output should be:
1001 : Maruti
1002 : Kia
1003 : Taxi
1004 : Truck
Could you please verify and correct the sample output if this is a typo?
Thank you.