Revised Stack Data Structure

1 Person has highlighted this activity

Activity Feed

Mar 05, 2022
#Day20 #100DaysOfCode
stack is a data structure that resembles a stack of plates for which the plates should only be taken from the top. there are many ways to implement a stack: struct, class, linked list. And, there is an already built-in stack in the std library.
i come by an example solved by using stack is the celebrity problem. it states as follows:
A celebrity accidentally crashes a party. Everybody knows the celebrity but the celebrity knows no one. Given a matrix of acquaintances where each person knows or does not know someone's else, find whether the celebrity attends the party.
Read more