Posts

Seating Arrangement Problem (HackerEarth) Solution in C#.

Image
This blog is related to the problem statement which I was find in HackerEarth.com for practice test. During problem solving I found this interesting and thought to create blog so as other developer might be find it useful. As C# is my favorite programming language I am creating code into C#. Problem Statement:- Akash  and  Vishal  are quite fond of travelling. They mostly travel by railways. They were travelling in a train one day and they got interested in the seating arrangement of their compartment. The compartment looked something like So they got interested to know the seat number facing them and the seat type facing them. The seats are denoted as follows : Window Seat :  WS Middle Seat :  MS Aisle Seat :  AS You will be given a seat number, find out the seat number facing you and the seat type, i.e.  WS ,  MS  or  AS . INPUT First line of input will consist of a single integer  T  denoting number of test-cases. Each test-...