For the below mention C statement, what is your comment?
signed int *p=(int*)malloc(sizeof(unsigned int));
signed int *p=(int*)malloc(sizeof(unsigned int));
Anonymous Quiz
22%
Would throw Runtime error
32%
Improper typecasting
28%
int value in the memory
18%
No problem with the statement
What differentiates a circular linked list from a normal linked list?
Anonymous Quiz
59%
You cannot have the ‘next’ pointer point to null in a circular linked list
10%
It is faster to traverse the circular linked list
24%
In a circular linked list, each node points to the previous node instead of the next node
7%
Head node is known in circular linked list
Explanation:
In a normal linked list, the ‘next’ pointer of the last node points to null. However, in a circular linked list, the ‘next’ pointer of the last node points to the head (first element) of the list. Every node in a circular linked list can be a starting point(head).
In a normal linked list, the ‘next’ pointer of the last node points to null. However, in a circular linked list, the ‘next’ pointer of the last node points to the head (first element) of the list. Every node in a circular linked list can be a starting point(head).
coding-interview-in-java.pdf
7.4 MB
Coding Interview in Java