Answer:
Stack.
Explanation:
Topological sort requires a bit of addition to DFS algorithm.So DFS can be done by two ways that are either you can use recursion or you can use Stack data structure to implement DFS.
Since recursion uses stack memory when it makes recursive calls and if you want to do it iteratively you can stack data structure.
Answer:
dominance
Explanation:
i just took it and got it right
Answer:
class PersonInfo:
def __init__(self):
self.num_kids = 0
def inc_num_kids(self):
self.num_kids += 1
person1 = PersonInfo()
print('Kids:', person1.num_kids)
person1.inc_num_kids()
print('New baby, kids now:', person1.num_kids)
Explanation:
Line 1 of the code, we define the class PersonInfo. Line 3 of the code is the function that will increment the member data num_kids.