diff --git a/celebrityProblem.cpp b/celebrityProblem.cpp new file mode 100644 index 0000000..45798e1 --- /dev/null +++ b/celebrityProblem.cpp @@ -0,0 +1,40 @@ +#include +using namespace std; +class Solution +{ + public: + //Function to find if there is a celebrity in the party or not. + int celebrity(vector >& M, int n) + { + stackst; + for(int i = 0;i