MCPcopy Create free account
hub / github.com/devparthgarg/Data-Structures-and-Algorithms / main

Function main

08. Matrix/05 Rotate/05 Rotate.cpp:43–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43int main()
44{
45 vector<vector<int>> v;
46
47 int row, col;
48 cin >> row >> col;
49
50 int val = 1;
51 for (int i = 0; i < row; i++)
52 {
53 vector<int> temp;
54 for (int j = 0; j < col; j++)
55 {
56 temp.push_back(val);
57 val++;
58 }
59 v.push_back(temp);
60 }
61
62 display(v, row, col);
63
64 cout << "Rotate :" << endl;
65
66 vector<vector<int>> res = rotate(v, row, col);
67 display(res, col, row);
68
69 return 0;
70}

Callers

nothing calls this directly

Calls 2

displayFunction · 0.70
rotateFunction · 0.70

Tested by

no test coverage detected