Hi All,
New to this forum and I am looking for help to write an
algorithm to detect infinite loop. Below is the situation:
Data
-----------------------
Field A Field B
joe reuben
reuben dave
dave josh
row man
john row
row john
-----------------------
In this situation all data in FIELD A will go to FIELD B.
Here field A can mean like an email alias and field
B is the email address to forward to within a 1 domain (@domain.com).
So from here can see that there is an infinite loop
at john -> row -> john or vice versa row->john->row
where as joe->reuben->dave->josh is not an infinite loop
because whoever alias josh belongs to will receive the
email (assuming a different box, and josh does not forward to
anyone else)
So given this two fields from a db table, how can I
write an algorithm to ensure all aliases and email forward
does not create and infinite loop and stop keep forwarding in
circle.
Thanks for your help,
John