DSA-Assignments

Log | Files | Refs | README

commit b48381489c1ae56560b6541ebc70b543ba0766cb
parent 471baade26f3531eaec7679388dbbc4a60b559f8
Author: a20vicad <vicada0203@gmail.com>
Date:   Fri,  1 Dec 2023 16:00:21 +0100

Added comments

Diffstat:
MProblem2/Problem2.cpp | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Problem2/Problem2.cpp b/Problem2/Problem2.cpp @@ -17,7 +17,7 @@ private: vector<int>* adj; public: Graph(int V); - void addEdge(int v, int w); + void addEdge(int v, int w); //v == Source node, w == Destintaion node bool isEdge(int v, int w); int getNumNodes(); void printGraph(); @@ -92,10 +92,16 @@ int main(){ list<int> nodes[4]; cout << "\n" << "Number of nodes: " << i << "\n"; cout << "Breadth First Traversal from A: \n"; - network.BFS(0); + network.BFS(0); //Traversal from 0 = A, 1 = B, 2 = C, 3 = D } -bool isAdversary(Graph network) { - +vector<int> findFriends(Graph network) { + vector<int> friends; + + return friends; +} + +bool isFriend(Graph network) { + return true; } \ No newline at end of file