# Problem solving in general, algorithms, graph theory

#21

Stacks are quite useful, you can use them to implement recursion in a language that doesn’t support it, and it’s used for a lot of other things such as parsing and evaluating Reverse Polish Notation expressions.
Stacks are also easy to implement, a simple list can act as one, and stacks are fast, their time complexity for the two operations is O(1).

#22

I have 10 nodes in my network. I calculated the size of the largest component in my network, using the below formula:

Size of the largest component (when node 1 is deleted) = Number of nodes in the largest component, after node 1 is deleted/ Number of nodes in the largest component

Size of largest component, node 1 is deleted = 0.53

Size of largest component, node 2 is deleted = 0.85

Size of largest component, node 3 is deleted = 0.88

Size of largest component, node 4 is deleted = 0.94

Size of largest component, node 5 is deleted = 0.94

Size of largest component, node 6 is deleted = 0.94

Size of largest component, node 7 is deleted = 0.94

When I want to calculate robustness, do I have to average of all the above values?

Thank you

Priya