Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the buses and passengers arrays.
Use 2 pointers to traverse buses and passengers with a simulation of passengers getting on a particular bus.
Solve with full IDE support and test cases