1.

How would you print the nodes in a circular linked list?

Answer»

def circularList(SELF): temp = self.head if self.head is not NONE: while(True): # To PRINT the nodes till we reach 1st node print(temp.data, end = " ") temp = temp.next if (temp == self.head): breakAdditional USEFUL INTERVIEW Resources:

  • Data Structure
  • Algorithm
  • DSA Problems


Discussion

No Comment Found