But it doesn't have to end here! Sign up for the 7-day coding interview crash course and you'll get a free Interview Cake problem every week.
You're in!
Delete a node from a singly-linked list, given only a variable pointing to that node.
The input could, for example, be the variable b below:
public class LinkedListNode
{
public int Value { get; set; }
public LinkedListNode Next { get; set; }
public LinkedListNode(int value)
{
Value = value;
}
}
var a = new LinkedListNode(1);
var b = new LinkedListNode(2);
var c = new LinkedListNode(3);
a.Next = b;
b.Next = c;
DeleteNode(b);
Log in or sign up with one click to get immediate access to 3 free mock interview questions
We'll never post on your wall or message your friends.
Actually, we don't support password-based login. Never have. Just the OAuth methods above. Why?
time and space.
Log in or sign up with one click to get immediate access to 3 free mock interview questions
We'll never post on your wall or message your friends.
Actually, we don't support password-based login. Never have. Just the OAuth methods above. Why?
Reset editor
Powered by qualified.io