A company relies on a set of suppliers, where some suppliers…
Questions
A cоmpаny relies оn а set оf suppliers, where some suppliers must receive components from others before they cаn start production. In certain cases, a group of suppliers may depend on one another in a way that forms a closed loop, meaning none of them can begin production. Given the suppliers list ((S)) and the list of dependency relationships ((R)), describe or write an algorithm to determine whether such a closed loop exists in the supply chain. Your solution must run in (O(|S|+|R|)).