Submitted Questions

  • What is the most efficient way of finding a loop in linklist?

    Traversing the link list with two pointers, both traversing at different speed.

    madhuri

    • Aug 7th, 2006

    Just keep  a var in the node and assign it as yes on visiting and traverse .......then each time check this field in the node if not visited i.e, no then make it yes ............if already yes then u hav a loop

    SIVA

    • Jul 16th, 2006

    VERY NICE