β
Correct Answer: (A)
public int length(node head) { int length = 0; if( head == null) return 0; node temp = head.getnext(); while(temp != head) { temp = temp.getnext(); length++; } return length; }
You must be Logged in to update hint/solution
Discussion
Question Analytics
838
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
88%
Success Rate