credFlow_assign

question 1) file=> depRail.js

Given arrival and departure times of all trains that reach a railway station. Find the minimum number of platforms required for the railway station so that no train is kept waiting. Consider that all the trains arrive on the same day and leave on the sameday. Arrival and departure time can never be the same for a train but we can have the arrival time of one train equal to the departure time of the other. At any given instance of time, the same platform can not be used for both departures of a train and the arrival of another train. In such cases, we need different platforms.

question 2) file=> spiralTraversing.js

Given a matrix of m x n elements, where m is the number of rows and n is the number of columns. Write a program to return all elements of the matrix in spiral order.