menu
home
Home
search
Search
people
About Us
exit_to_app
Login
home
Home
search
Search
people
About Us
exit_to_app
Login
Practicing for Linkedlist-Length-Recursion of Algorithms
Questions 1 of 10
Q. Consider the following iterative implementation used to find the length of a linked list:
struct Node{
int val;
struct Node *next;
}*head;
int get_len(){
struct Node *temp = head->next;
int len = 0;
while(_____){
len++;
temp = temp->next;
}
return len;
}
Which of the following conditions should be checked to complete the above code?
temp->next != 0
temp == 0
temp != 0
temp->next == 0
Submit
lock
Login
person
Signup
Email
Password
Name
Email
Password
Confirm Password