This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Program to find minimum number of platforms | |
// required on a railway station | |
#include<iostream> | |
#include<algorithm> | |
using namespace std; | |
// Returns minimum number of platforms reqquired | |
int findPlatform(int arr[], int dep[], int n) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// { Driver Code Starts | |
#include <bits/stdc++.h> | |
using namespace std; | |
// } Driver Code Ends | |
/* Function to check if the given graph contains cycle | |
* V: number of vertices | |
* adj[]: representation of graph | |
*/ |