Tweeted twitter.com/#!/StackProgrammer/status/645621068074516480
2 added 1 character in body; edited tags
source | link

Adding a vertex in a graph that is represented using an adjacency matrix takes O(|v|^2) time complexity according to http://bigocheatsheet.com/ (graph operation > adjacency matrix > add vertex). but

But I couldn't find a reason why  ?. since Since all we need is to add a row and a column, which of course takes O(|v|), what is the reasoning behind this  ?

Adding a vertex in a graph that is represented using an adjacency matrix takes O(|v|^2) time complexity according to http://bigocheatsheet.com/ (graph operation > adjacency matrix > add vertex). but I couldn't find a reason why  ?. since all we need is to add a row and a column which of course takes O(|v|), what is the reasoning behind this  ?

Adding a vertex in a graph that is represented using an adjacency matrix takes O(|v|^2) time complexity according to http://bigocheatsheet.com/ (graph operation > adjacency matrix > add vertex).

But I couldn't find a reason why? Since all we need is to add a row and a column, which of course takes O(|v|), what is the reasoning behind this?

1
source | link

why adding a vertex in a graph represented using an adjacency matrix takes O(|v|^2) time complexity?

Adding a vertex in a graph that is represented using an adjacency matrix takes O(|v|^2) time complexity according to http://bigocheatsheet.com/ (graph operation > adjacency matrix > add vertex). but I couldn't find a reason why ?. since all we need is to add a row and a column which of course takes O(|v|), what is the reasoning behind this ?