Amazon interview question

Design a railway reservation system