troubleshooting Question

How do you perform a circular reference check?

Avatar of Legion6789
Legion6789 asked on
.NET ProgrammingC#Algorithms
2 Comments1 Solution1139 ViewsLast Modified:
I have a series of items that can be emailed.  The trigger for when to send each item can be based on an event.  One possible event is the sending of another item.  For example: Item 3 is sent 10 days after Item 2.  I can see how one could check for a simple circular reference such as Item 1 is sent 10 days before item 2 and item 2 is sent 30 days after item 1.  But how would one check for more complicated circular references such as:
Item1: Send 10 days before Item2
Item2: Send 30 days after Item4
Item3: Send 20 days after Item5
Item4 Send 10 days before Item2
Item5 Send 5 days after Item4

Basically I need an algorithm that could determine if its a circular reference and if not, calculate the hard dates for all of these (obviously one item would have to have some sort of fixed date for the others to be calculated from).
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros